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 <[email protected]>
---
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
On Sat, 14 Nov 2020 17:38:26 +0800 Zou Wei wrote:
> 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 <[email protected]>
Some macro uses it implicitly, this breaks the build.