Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [bug report] ice: Add support to print error on PHY FW load failure
Date: Thu, 11 Nov 2021 16:37:48 +0300	[thread overview]
Message-ID: <20211111133748.GA22374@kili> (raw)

Hello Brett Creeley,

The patch 99d407524cdf: "ice: Add support to print error on PHY FW
load failure" from Oct 13, 2021, leads to the following Smatch static
checker warning:

	drivers/net/ethernet/intel/ice/ice_main.c:956 ice_check_phy_fw_load()
	warn: duplicate check 'link_cfg_err & ((((1))) << (6))' (previous on line 948)

drivers/net/ethernet/intel/ice/ice_main.c
    946 static void ice_check_phy_fw_load(struct ice_pf *pf, u8 link_cfg_err)
    947 {
    948         if (!(link_cfg_err & ICE_AQ_LINK_EXTERNAL_PHY_LOAD_FAILURE)) {
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
There is a check here.

    949                 clear_bit(ICE_FLAG_PHY_FW_LOAD_FAILED, pf->flags);
    950                 return;
    951         }
    952 
    953         if (test_bit(ICE_FLAG_PHY_FW_LOAD_FAILED, pf->flags))
    954                 return;
    955 
--> 956         if (link_cfg_err & ICE_AQ_LINK_EXTERNAL_PHY_LOAD_FAILURE) {
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We already know this condition is true.


    957                 dev_err(ice_pf_to_dev(pf), "Device failed to load the FW for the external PHY. Please download and install the latest NVM for your device and try again\n");
    958                 set_bit(ICE_FLAG_PHY_FW_LOAD_FAILED, pf->flags);
    959         }
    960 }

regards,
dan carpenter

                 reply	other threads:[~2021-11-11 13:37 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=20211111133748.GA22374@kili \
    --to=dan.carpenter@oracle.com \
    --cc=intel-wired-lan@osuosl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox