kernel/patches/0370-net-hns3-fix-compile-warning-without-CONFIG_RFS_ACCE.patch
2023-11-17 14:19:46 +08:00

54 lines
2.0 KiB
Diff

From eb53e8ee1acddb28605ba4b2c718ca350f4233df Mon Sep 17 00:00:00 2001
From: Jian Shen <shenjian15@huawei.com>
Date: Tue, 28 May 2019 17:02:51 +0800
Subject: [PATCH 009/283] net: hns3: fix compile warning without
CONFIG_RFS_ACCEL
mainline inclusion
from mainline-v5.3-rc1
commit 4c1522765ca84e45d147557bf7f19e85e40c81e0
category: cleanup
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I8EJ0A
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4c1522765ca84e45d147557bf7f19e85e40c81e0
--------------------------------
The ifdef condition of function hclge_add_fd_entry_by_arfs() is
unnecessary. It may cause compile warning when CONFIG_RFS_ACCEL
is not chosen. This patch fixes it by removing the ifdef condition.
Fixes: d93ed94fbeaf ("net: hns3: add aRFS support for PF")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Xiaodong Li <lixiaodong67@huawei.com>
---
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index e34611e70699..35a08f8b97ed 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -6401,7 +6401,6 @@ static void hclge_fd_build_arfs_rule(const struct hclge_fd_rule_tuples *tuples,
static int hclge_add_fd_entry_by_arfs(struct hnae3_handle *handle, u16 queue_id,
u16 flow_id, struct flow_keys *fkeys)
{
-#ifdef CONFIG_RFS_ACCEL
struct hclge_vport *vport = hclge_get_vport(handle);
struct hclge_fd_rule_tuples new_tuples;
struct hclge_dev *hdev = vport->back;
@@ -6473,7 +6472,6 @@ static int hclge_add_fd_entry_by_arfs(struct hnae3_handle *handle, u16 queue_id,
}
return rule->location;
-#endif
}
static void hclge_rfs_filter_expire(struct hclge_dev *hdev)
--
2.34.1