lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200605000748.31442-1-tseewald@gmail.com>
Date:   Thu,  4 Jun 2020 19:07:48 -0500
From:   Tom Seewald <tseewald@...il.com>
To:     netdev@...r.kernel.org
Cc:     tseewald@...il.com, Vishal Kulkarni <vishal@...lsio.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Subject: [PATCH] cxgb4: Fix 'defined but not used' warning for cxgb4_uld_in_use()

The only user of cxgb4_uld_in_use() is cxgb4_set_ktls_feature() which is
only available when CONFIG_CHELSIO_TLS_DEVICE=y. To avoid this compiler
warning when CONFIG_CHELSIO_TLS_DEVICE=n, place cxgb4_uld_in_use() behind
the same ifdef.

Signed-off-by: Tom Seewald <tseewald@...il.com>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
index 0307e9c69a47..ac6c06cfd9be 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
@@ -663,6 +663,11 @@ static int uld_attach(struct adapter *adap, unsigned int uld)
 	return 0;
 }
 
+#ifdef CONFIG_CHELSIO_TLS_DEVICE
+/* cxgb4_set_ktls_feature: request FW to enable/disable ktls settings.
+ * @adap: adapter info
+ * @enable: 1 to enable / 0 to disable ktls settings.
+ */
 static bool cxgb4_uld_in_use(struct adapter *adap)
 {
 	const struct tid_info *t = &adap->tids;
@@ -670,11 +675,6 @@ static bool cxgb4_uld_in_use(struct adapter *adap)
 	return (atomic_read(&t->conns_in_use) || t->stids_in_use);
 }
 
-#ifdef CONFIG_CHELSIO_TLS_DEVICE
-/* cxgb4_set_ktls_feature: request FW to enable/disable ktls settings.
- * @adap: adapter info
- * @enable: 1 to enable / 0 to disable ktls settings.
- */
 int cxgb4_set_ktls_feature(struct adapter *adap, bool enable)
 {
 	int ret = 0;
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ