* [Intel-wired-lan] [bug report] ice: Add support to print error on PHY FW load failure
@ 2021-11-11 13:37 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2021-11-11 13:37 UTC (permalink / raw)
To: intel-wired-lan
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-11 13:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-11 13:37 [Intel-wired-lan] [bug report] ice: Add support to print error on PHY FW load failure Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox