tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   4d41ead6ead97c3730bbd186a601a64828668f01
commit: ffe10e679cec9a99f19049459cb27c2fbb1e913a net: dsa: sja1105: Add support 
for the SGMII port
config: arm-randconfig-m031-20200829 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <l...@intel.com>
Reported-by: Dan Carpenter <dan.carpen...@oracle.com>

New smatch warnings:
drivers/net/dsa/sja1105/sja1105_main.c:1608 sja1105_static_config_reload() 
warn: bitwise AND condition is false here

# 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ffe10e679cec9a99f19049459cb27c2fbb1e913a
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ffe10e679cec9a99f19049459cb27c2fbb1e913a
vim +1608 drivers/net/dsa/sja1105/sja1105_main.c

6666cebc5e306f Vladimir Oltean 2019-05-02  1590         for (i = 0; i < 
SJA1105_NUM_PORTS; i++) {
8400cff60b472c Vladimir Oltean 2019-06-08  1591                 rc = 
sja1105_adjust_port_config(priv, i, speed_mbps[i]);
6666cebc5e306f Vladimir Oltean 2019-05-02  1592                 if (rc < 0)
6666cebc5e306f Vladimir Oltean 2019-05-02  1593                         goto 
out;
6666cebc5e306f Vladimir Oltean 2019-05-02  1594         }
ffe10e679cec9a Vladimir Oltean 2020-03-20  1595  
ffe10e679cec9a Vladimir Oltean 2020-03-20  1596         if 
(sja1105_supports_sgmii(priv, SJA1105_SGMII_PORT)) {
ffe10e679cec9a Vladimir Oltean 2020-03-20  1597                 bool an_enabled 
= !!(bmcr & BMCR_ANENABLE);
ffe10e679cec9a Vladimir Oltean 2020-03-20  1598  
ffe10e679cec9a Vladimir Oltean 2020-03-20  1599                 
sja1105_sgmii_pcs_config(priv, an_enabled, false);
ffe10e679cec9a Vladimir Oltean 2020-03-20  1600  
ffe10e679cec9a Vladimir Oltean 2020-03-20  1601                 if 
(!an_enabled) {
ffe10e679cec9a Vladimir Oltean 2020-03-20  1602                         int 
speed = SPEED_UNKNOWN;
ffe10e679cec9a Vladimir Oltean 2020-03-20  1603  
ffe10e679cec9a Vladimir Oltean 2020-03-20  1604                         if 
(bmcr & BMCR_SPEED1000)
ffe10e679cec9a Vladimir Oltean 2020-03-20  1605                                 
speed = SPEED_1000;
ffe10e679cec9a Vladimir Oltean 2020-03-20  1606                         else if 
(bmcr & BMCR_SPEED100)
ffe10e679cec9a Vladimir Oltean 2020-03-20  1607                                 
speed = SPEED_100;
ffe10e679cec9a Vladimir Oltean 2020-03-20 @1608                         else if 
(bmcr & BMCR_SPEED10)
                                                                                
 ^^^^^^^^^^^^^^^^^^^
This is an impossible condition.  BMCR_SPEED10 is zero.

ffe10e679cec9a Vladimir Oltean 2020-03-20  1609                                 
speed = SPEED_10;
ffe10e679cec9a Vladimir Oltean 2020-03-20  1610  
ffe10e679cec9a Vladimir Oltean 2020-03-20  1611                         
sja1105_sgmii_pcs_force_speed(priv, speed);
ffe10e679cec9a Vladimir Oltean 2020-03-20  1612                 }
ffe10e679cec9a Vladimir Oltean 2020-03-20  1613         }
6666cebc5e306f Vladimir Oltean 2019-05-02  1614  out:
af580ae2dcb250 Vladimir Oltean 2019-11-09  1615         
mutex_unlock(&priv->mgmt_lock);
af580ae2dcb250 Vladimir Oltean 2019-11-09  1616  
6666cebc5e306f Vladimir Oltean 2019-05-02  1617         return rc;
6666cebc5e306f Vladimir Oltean 2019-05-02  1618  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org

Attachment: .config.gz
Description: application/gzip

Reply via email to