linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] cxgb4: fix cxgb4_uld_in_use() not used error
@ 2020-06-08  0:58 Heinrich Schuchardt
  2020-06-09  2:07 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2020-06-08  0:58 UTC (permalink / raw)
  To: Vishal Kulkarni
  Cc: David S . Miller, Jakub Kicinski, netdev, linux-kernel,
	Heinrich Schuchardt

When building without CONFIG_CHELSIO_TLS_DEVICE a build error occurs:

drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:666:13: error:
‘cxgb4_uld_in_use’ defined but not used [-Werror=unused-function]
  666 | static bool cxgb4_uld_in_use(struct adapter *adap)
      |             ^~~~~~~~~~~~~~~~

Guard cxgb4_uld_in_use() with #ifdef CONFIG_CHELSIO_TLS_DEVICE.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
index 0307e9c69a47..f08f860b4983 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
@@ -663,6 +663,8 @@ static int uld_attach(struct adapter *adap, unsigned int uld)
 	return 0;
 }

+#ifdef CONFIG_CHELSIO_TLS_DEVICE
+
 static bool cxgb4_uld_in_use(struct adapter *adap)
 {
 	const struct tid_info *t = &adap->tids;
@@ -670,7 +672,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.
--
2.26.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] cxgb4: fix cxgb4_uld_in_use() not used error
  2020-06-08  0:58 [PATCH 1/1] cxgb4: fix cxgb4_uld_in_use() not used error Heinrich Schuchardt
@ 2020-06-09  2:07 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-06-09  2:07 UTC (permalink / raw)
  To: xypron.glpk; +Cc: vishal, kuba, netdev, linux-kernel

From: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Mon,  8 Jun 2020 02:58:23 +0200

> When building without CONFIG_CHELSIO_TLS_DEVICE a build error occurs:
> 
> drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:666:13: error:
> ‘cxgb4_uld_in_use’ defined but not used [-Werror=unused-function]
>   666 | static bool cxgb4_uld_in_use(struct adapter *adap)
>       |             ^~~~~~~~~~~~~~~~
> 
> Guard cxgb4_uld_in_use() with #ifdef CONFIG_CHELSIO_TLS_DEVICE.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


Please see commit ef1c75593e770aff8749e902aa0deb6855a3f485, which already
does this.

Thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-09  2:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-08  0:58 [PATCH 1/1] cxgb4: fix cxgb4_uld_in_use() not used error Heinrich Schuchardt
2020-06-09  2:07 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).