[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1605346706-23782-1-git-send-email-zou_wei@huawei.com>
Date: Sat, 14 Nov 2020 17:38:26 +0800
From: Zou Wei <zou_wei@...wei.com>
To: <vishal@...lsio.com>, <davem@...emloft.net>, <kuba@...nel.org>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Zou Wei <zou_wei@...wei.com>
Subject: [PATCH -next] cxgb4: Remove unused variable ret
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@...wei.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
Powered by blists - more mailing lists