[lvc-project] [PATCH] cxgb4: Removing the rudimentary cast after the added
Markov Gleb
markov.gi at npc-ksb.ru
Mon May 25 15:43:24 MSK 2026
From: Gleb Markov <markov.gi at npc-ksb.ru>
The sge_idma_decode_nstates variable is overwritten after
processing the switch-case.
In order to avoid incorrect casting, it was suggested
to delete the if-else case.
Delete the if-else block.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 68bce1922fa9 ("cxgb4: Add code to dump SGE registers when hitting idma hangs")
Signed-off-by: Gleb Markov <markov.gi at npc-ksb.ru>
---
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index 8d719f82854a..f3e8153a7a0b 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -6735,14 +6735,6 @@ void t4_sge_decode_idma_state(struct adapter *adapter, int state)
return;
}
- if (is_t4(adapter->params.chip)) {
- sge_idma_decode = (const char **)t4_decode;
- sge_idma_decode_nstates = ARRAY_SIZE(t4_decode);
- } else {
- sge_idma_decode = (const char **)t5_decode;
- sge_idma_decode_nstates = ARRAY_SIZE(t5_decode);
- }
-
if (state < sge_idma_decode_nstates)
CH_WARN(adapter, "idma state %s\n", sge_idma_decode[state]);
else
--
2.43.0
More information about the lvc-project
mailing list