[PATCH net] bnxt_en: Fix static checker warning in bnxt_fw_reset_task()

Subsystems: broadcom bnxt_en 50 gigabit ethernet driver, networking drivers, the rest

STALE1871d

2 messages, 2 authors, 2021-07-26 · open the first message on its own page

[PATCH net] bnxt_en: Fix static checker warning in bnxt_fw_reset_task()

From: Michael Chan <michael.chan@broadcom.com>
Date: 2021-07-26 18:53:30

From: Somnath Kotur <redacted>

Now that we return when bnxt_open() fails in bnxt_fw_reset_task(),
there is no need to check for 'rc' value again before invoking
bnxt_reenable_sriov().

Fixes: 3958b1da725a ("bnxt_en: fix error path of FW reset")
Reported-by: Dan Carpenter <redacted>
Signed-off-by: Somnath Kotur <redacted>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 4db162cee911..89606587b156 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -12131,9 +12131,8 @@ static void bnxt_fw_reset_task(struct work_struct *work)
 		/* Make sure fw_reset_state is 0 before clearing the flag */
 		smp_mb__before_atomic();
 		clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state);
-		bnxt_ulp_start(bp, rc);
-		if (!rc)
-			bnxt_reenable_sriov(bp);
+		bnxt_ulp_start(bp, 0);
+		bnxt_reenable_sriov(bp);
 		bnxt_vf_reps_alloc(bp);
 		bnxt_vf_reps_open(bp);
 		bnxt_dl_health_recovery_done(bp);
-- 
2.18.1

Re: [PATCH net] bnxt_en: Fix static checker warning in bnxt_fw_reset_task()

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-07-26 21:52:31

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Mon, 26 Jul 2021 14:52:48 -0400 you wrote:
From: Somnath Kotur <redacted>

Now that we return when bnxt_open() fails in bnxt_fw_reset_task(),
there is no need to check for 'rc' value again before invoking
bnxt_reenable_sriov().

Fixes: 3958b1da725a ("bnxt_en: fix error path of FW reset")
Reported-by: Dan Carpenter <redacted>
Signed-off-by: Somnath Kotur <redacted>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>

[...]
Here is the summary with links:
  - [net] bnxt_en: Fix static checker warning in bnxt_fw_reset_task()
    https://git.kernel.org/netdev/net/c/758684e49f4c

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help