fix gcc9 new warning
This commit is contained in:
parent
31569f5268
commit
d0be35545d
51
fix-gcc9-new-warning.patch
Normal file
51
fix-gcc9-new-warning.patch
Normal file
@ -0,0 +1,51 @@
|
||||
From e43f6fdd252c2b85a626e10f3eda7b27192cedcf Mon Sep 17 00:00:00 2001
|
||||
From: hanzhijun <hanzhijun1@huawei.com>
|
||||
Date: Fri, 5 Feb 2021 15:57:13 +0800
|
||||
Subject: [PATCH] fix gcc9 new warning
|
||||
|
||||
---
|
||||
src/i40e_txrx.c | 21 +++++++++++----------
|
||||
1 file changed, 11 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/i40e_txrx.c b/src/i40e_txrx.c
|
||||
index ea07464..0ca5a17 100644
|
||||
--- a/src/i40e_txrx.c
|
||||
+++ b/src/i40e_txrx.c
|
||||
@@ -9,6 +9,17 @@
|
||||
#include "i40e_trace.h"
|
||||
#include "i40e_prototype.h"
|
||||
|
||||
+/**
|
||||
+ * i40e_rx_offset - Return expected offset into page to access data
|
||||
+ * @rx_ring: Ring we are requesting offset of
|
||||
+ *
|
||||
+ * Returns the offset value for ring into the data buffer.
|
||||
+ */
|
||||
+static inline unsigned int i40e_rx_offset(struct i40e_ring *rx_ring)
|
||||
+{
|
||||
+ return ring_uses_build_skb(rx_ring) ? I40E_SKB_PAD : 0;
|
||||
+}
|
||||
+
|
||||
static inline __le64 build_ctob(u32 td_cmd, u32 td_offset, unsigned int size,
|
||||
u32 td_tag)
|
||||
{
|
||||
@@ -1776,16 +1787,6 @@ static bool i40e_alloc_mapped_skb(struct i40e_ring *rx_ring,
|
||||
}
|
||||
|
||||
#else /* CONFIG_I40E_DISABLE_PACKET_SPLIT */
|
||||
-/**
|
||||
- * i40e_rx_offset - Return expected offset into page to access data
|
||||
- * @rx_ring: Ring we are requesting offset of
|
||||
- *
|
||||
- * Returns the offset value for ring into the data buffer.
|
||||
- */
|
||||
-static inline unsigned int i40e_rx_offset(struct i40e_ring *rx_ring)
|
||||
-{
|
||||
- return ring_uses_build_skb(rx_ring) ? I40E_SKB_PAD : 0;
|
||||
-}
|
||||
|
||||
/**
|
||||
* i40e_alloc_mapped_page - recycle or make a new page
|
||||
--
|
||||
2.27.0
|
||||
|
||||
12
i40e.spec
12
i40e.spec
@ -9,12 +9,14 @@
|
||||
Name: i40e
|
||||
Summary: Intel(R) 40-10 Gigabit Ethernet Connection Network Driver
|
||||
Version: 2.14.13
|
||||
Release: 1
|
||||
Release: 2
|
||||
Vendor: Intel Corporation
|
||||
License: GPL-2.0
|
||||
URL: http://support.intel.com
|
||||
Source0: https://downloadcenter.intel.com/download/24411/Intel-Network-Adapter-Driver-for-PCIe-40-Gigabit-Ethernet-Network-Connections-Under-Linux-/%{name}-%{version}.tar.gz
|
||||
|
||||
Patch0001: fix-gcc9-new-warning.patch
|
||||
|
||||
Requires: kernel, findutils, gawk, bash
|
||||
|
||||
BuildRequires: kernel-devel
|
||||
@ -23,7 +25,7 @@ BuildRequires: kernel-devel
|
||||
This package contains the Intel(R) 40-10 Gigabit Ethernet Connection Network Driver.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
%build
|
||||
make -C src clean
|
||||
@ -381,5 +383,11 @@ else
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Fri Feb 5 2021 hanzhijun <hanzhijun1@huawei.com> - 2.14.13-2
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:fix gcc9 warning -Werror=implicit-function-declaration
|
||||
|
||||
* Tue Feb 2 2021 seuzw <930zhaowei@163.com> - 2.14.13-1
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user