* [bug report] bnxt_en: Handle firmware reset.
@ 2026-08-19 7:06 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2026-08-19 7:06 UTC (permalink / raw)
To: Michael Chan; +Cc: netdev
[ This old code shows up as a new warning because it was reverted and
then re-applied. ]
Hello Michael Chan,
Commit 230d1f0de754 ("bnxt_en: Handle firmware reset.") from Aug 29,
2019 (linux-next), leads to the following Smatch static checker
warning:
drivers/net/ethernet/broadcom/bnxt/bnxt.c:15484 bnxt_fw_reset_task()
warn: replace while loop with if statement?
drivers/net/ethernet/broadcom/bnxt/bnxt.c
15481 bp->fw_reset_state = BNXT_FW_RESET_STATE_OPENING;
15482 fallthrough;
15483 case BNXT_FW_RESET_STATE_OPENING:
--> 15484 while (!rtnl_trylock()) {
This while () would be more readabel as an if ().
15485 bnxt_queue_fw_reset_work(bp, HZ / 10);
15486 return;
^^^^^^^
Since it doesn't loop.
15487 }
15488 netdev_lock(bp->dev);
15489 rc = bnxt_open(bp->dev);
15490 if (rc) {
15491 netdev_err(bp->dev, "bnxt_open() failed during FW reset\n");
This email is a free service from the Smatch-CI project [smatch.sf.net].
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-19 7:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-19 7:06 [bug report] bnxt_en: Handle firmware reset Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox