From: Zou Wei <zou_wei@huawei.com>
To: <vishal@chelsio.com>, <davem@davemloft.net>, <kuba@kernel.org>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Zou Wei <zou_wei@huawei.com>
Subject: [PATCH -next] cxgb4: Remove unused variable ret
Date: Sat, 14 Nov 2020 17:38:26 +0800 [thread overview]
Message-ID: <1605346706-23782-1-git-send-email-zou_wei@huawei.com> (raw)
This patch fixes below warning reported by coccicheck:
./drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:3284:5-8: Unneeded variable: "ret". Return "0" on line 3301
Signed-off-by: Zou Wei <zou_wei@huawei.com>
---
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index 98d01a7..426d15e 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -3281,8 +3281,6 @@ int t4_get_scfg_version(struct adapter *adapter, u32 *vers)
*/
int t4_get_version_info(struct adapter *adapter)
{
- int ret = 0;
-
#define FIRST_RET(__getvinfo) \
do { \
int __ret = __getvinfo; \
@@ -3298,7 +3296,7 @@ int t4_get_version_info(struct adapter *adapter)
FIRST_RET(t4_get_vpd_version(adapter, &adapter->params.vpd_vers));
#undef FIRST_RET
- return ret;
+ return 0;
}
/**
--
2.6.2
next reply other threads:[~2020-11-14 9:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-14 9:38 Zou Wei [this message]
2020-11-14 17:50 ` [PATCH -next] cxgb4: Remove unused variable ret Jakub Kicinski
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=1605346706-23782-1-git-send-email-zou_wei@huawei.com \
--to=zou_wei@huawei.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.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).