From: Dan Carpenter <error27@gmail.com>
To: Michael Chan <michael.chan@broadcom.com>
Cc: netdev@vger.kernel.org
Subject: [bug report] bnxt_en: Handle firmware reset.
Date: Wed, 19 Aug 2026 10:06:47 +0300 [thread overview]
Message-ID: <aoVWB2bqd776g_KD@stanley.mountain> (raw)
[ 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
reply other threads:[~2026-08-19 7:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aoVWB2bqd776g_KD@stanley.mountain \
--to=error27@gmail.com \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.