* [PATCH] cxgb4: Fix 'defined but not used' warning for cxgb4_uld_in_use()
@ 2020-06-05 0:07 Tom Seewald
2020-06-05 1:36 ` [PATCH v2] " Tom Seewald
0 siblings, 1 reply; 6+ messages in thread
From: Tom Seewald @ 2020-06-05 0:07 UTC (permalink / raw)
To: netdev; +Cc: tseewald, Vishal Kulkarni, David S. Miller, Jakub Kicinski
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@gmail.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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2] cxgb4: Fix 'defined but not used' warning for cxgb4_uld_in_use()
2020-06-05 0:07 [PATCH] cxgb4: Fix 'defined but not used' warning for cxgb4_uld_in_use() Tom Seewald
@ 2020-06-05 1:36 ` Tom Seewald
2020-06-05 20:08 ` David Miller
2020-06-06 6:04 ` Tom Seewald
0 siblings, 2 replies; 6+ messages in thread
From: Tom Seewald @ 2020-06-05 1:36 UTC (permalink / raw)
To: netdev; +Cc: tseewald, Vishal Kulkarni, David S. Miller, Jakub Kicinski
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@gmail.com>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
index 0307e9c69a47..08439e215efe 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
@@ -663,6 +663,7 @@ 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 +671,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.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] cxgb4: Fix 'defined but not used' warning for cxgb4_uld_in_use()
2020-06-05 1:36 ` [PATCH v2] " Tom Seewald
@ 2020-06-05 20:08 ` David Miller
2020-06-06 6:04 ` Tom Seewald
1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2020-06-05 20:08 UTC (permalink / raw)
To: tseewald; +Cc: netdev, vishal, kuba
From: Tom Seewald <tseewald@gmail.com>
Date: Thu, 4 Jun 2020 20:36:32 -0500
> 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@gmail.com>
This doesn't apply to the net GIT tree.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] cxgb4: Fix 'defined but not used' warning for cxgb4_uld_in_use()
2020-06-05 1:36 ` [PATCH v2] " Tom Seewald
2020-06-05 20:08 ` David Miller
@ 2020-06-06 6:04 ` Tom Seewald
2020-06-06 8:01 ` Tom Seewald
2020-06-06 22:43 ` David Miller
1 sibling, 2 replies; 6+ messages in thread
From: Tom Seewald @ 2020-06-06 6:04 UTC (permalink / raw)
To: netdev; +Cc: Vishal Kulkarni, David S. Miller, Jakub Kicinski, tseewald
> This doesn't apply to the net GIT tree.
Apologies, this fix is for net-next. Let me know if I should resend.
Thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] cxgb4: Fix 'defined but not used' warning for cxgb4_uld_in_use()
2020-06-06 6:04 ` Tom Seewald
@ 2020-06-06 8:01 ` Tom Seewald
2020-06-06 22:43 ` David Miller
1 sibling, 0 replies; 6+ messages in thread
From: Tom Seewald @ 2020-06-06 8:01 UTC (permalink / raw)
To: netdev, tseewald; +Cc: Vishal Kulkarni, David S. Miller, Jakub Kicinski
Looks like this has already been fixed in net, sorry for the noise.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] cxgb4: Fix 'defined but not used' warning for cxgb4_uld_in_use()
2020-06-06 6:04 ` Tom Seewald
2020-06-06 8:01 ` Tom Seewald
@ 2020-06-06 22:43 ` David Miller
1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2020-06-06 22:43 UTC (permalink / raw)
To: tseewald; +Cc: netdev, vishal, kuba
From: Tom Seewald <tseewald@gmail.com>
Date: Sat, 6 Jun 2020 01:04:21 -0500
>> This doesn't apply to the net GIT tree.
> Apologies, this fix is for net-next. Let me know if I should resend.
Right now net == net-next, and no new changes are going into net-next.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-06-06 22:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-05 0:07 [PATCH] cxgb4: Fix 'defined but not used' warning for cxgb4_uld_in_use() Tom Seewald
2020-06-05 1:36 ` [PATCH v2] " Tom Seewald
2020-06-05 20:08 ` David Miller
2020-06-06 6:04 ` Tom Seewald
2020-06-06 8:01 ` Tom Seewald
2020-06-06 22:43 ` 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).