From: Tom Seewald <tseewald@gmail.com>
To: netdev@vger.kernel.org
Cc: tseewald@gmail.com, Vishal Kulkarni <vishal@chelsio.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH v2] cxgb4: Fix 'defined but not used' warning for cxgb4_uld_in_use()
Date: Thu, 4 Jun 2020 20:36:32 -0500 [thread overview]
Message-ID: <20200605013632.781-1-tseewald@gmail.com> (raw)
In-Reply-To: <20200605000748.31442-1-tseewald@gmail.com>
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
next prev parent reply other threads:[~2020-06-05 1:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2020-06-05 20:08 ` [PATCH v2] " David Miller
2020-06-06 6:04 ` Tom Seewald
2020-06-06 8:01 ` Tom Seewald
2020-06-06 22:43 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200605013632.781-1-tseewald@gmail.com \
--to=tseewald@gmail.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vishal@chelsio.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).