Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1556529 > unrolled thread

[PATCH] bnxt_en: hide unused bnxt_get_max_func_{vnics,rss_ctxs} functions

Started byArnd Bergmann <arnd@arndb.de>
First post2017-01-11 15:40 +0100
Last post2017-01-11 17:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] bnxt_en: hide unused bnxt_get_max_func_{vnics,rss_ctxs} functions Arnd Bergmann <arnd@arndb.de> - 2017-01-11 15:40 +0100
    Re: [PATCH] bnxt_en: hide unused  bnxt_get_max_func_{vnics,rss_ctxs} functions David Miller <davem@davemloft.net> - 2017-01-11 17:00 +0100

#1556529 — [PATCH] bnxt_en: hide unused bnxt_get_max_func_{vnics,rss_ctxs} functions

FromArnd Bergmann <arnd@arndb.de>
Date2017-01-11 15:40 +0100
Subject[PATCH] bnxt_en: hide unused bnxt_get_max_func_{vnics,rss_ctxs} functions
Message-ID<sYsed-82P-13@gated-at.bofh.it>
There are lots of #ifdefs in this file, and a recent patch got one
of them wrong, leading to a harmless warning in some randconfig
builds:

ethernet/broadcom/bnxt/bnxt.c:4956:21: error: 'bnxt_get_max_func_vnics' defined but not used [-Werror=unused-function]
ethernet/broadcom/bnxt/bnxt.c:4947:21: error: 'bnxt_get_max_func_rss_ctxs' defined but not used [-Werror=unused-function]

Ideally we'd just remove all of them and use 'if (IS_ENABLED())'
checks instead, which don't have this problem, but for now, I'm
adding one more #ifdef to shut up the new warning.

Fixes: 8079e8f107bf ("bnxt_en: Refactor code that determines RFS capability.")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 7bd2a85694dd..c0918507fdb4 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -4944,6 +4944,7 @@ static int bnxt_setup_int_mode(struct bnxt *bp)
 	return rc;
 }
 
+#ifdef CONFIG_RFS_ACCEL
 static unsigned int bnxt_get_max_func_rss_ctxs(struct bnxt *bp)
 {
 #if defined(CONFIG_BNXT_SRIOV)
@@ -4961,6 +4962,7 @@ static unsigned int bnxt_get_max_func_vnics(struct bnxt *bp)
 #endif
 	return bp->pf.max_vnics;
 }
+#endif
 
 unsigned int bnxt_get_max_func_stat_ctxs(struct bnxt *bp)
 {
-- 
2.9.0

[toc] | [next] | [standalone]


#1556656 — Re: [PATCH] bnxt_en: hide unused bnxt_get_max_func_{vnics,rss_ctxs} functions

FromDavid Miller <davem@davemloft.net>
Date2017-01-11 17:00 +0100
SubjectRe: [PATCH] bnxt_en: hide unused bnxt_get_max_func_{vnics,rss_ctxs} functions
Message-ID<sYttE-id-17@gated-at.bofh.it>
In reply to#1556529
From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 11 Jan 2017 15:36:09 +0100

> There are lots of #ifdefs in this file, and a recent patch got one
> of them wrong, leading to a harmless warning in some randconfig
> builds:
> 
> ethernet/broadcom/bnxt/bnxt.c:4956:21: error: 'bnxt_get_max_func_vnics' defined but not used [-Werror=unused-function]
> ethernet/broadcom/bnxt/bnxt.c:4947:21: error: 'bnxt_get_max_func_rss_ctxs' defined but not used [-Werror=unused-function]
> 
> Ideally we'd just remove all of them and use 'if (IS_ENABLED())'
> checks instead, which don't have this problem, but for now, I'm
> adding one more #ifdef to shut up the new warning.
> 
> Fixes: 8079e8f107bf ("bnxt_en: Refactor code that determines RFS capability.")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Michael Chan has a fix for this coming my way.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web