1 Star 0 Fork 19

孙苏皖 / i40e

forked from src-openEuler / i40e 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fix-gcc9-new-warning.patch 1.41 KB
一键复制 编辑 原始数据 按行查看 历史
Your Name 提交于 2021-02-05 16:07 . fix gcc9 new warning
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sunsuwan/i40e.git
git@gitee.com:sunsuwan/i40e.git
sunsuwan
i40e
i40e
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891