Hi Dan,

url:    
https://github.com/0day-ci/linux/commits/Dan-Murphy/DP83869-WoL-and-Speed-optimization/20200925-002844
 
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git  
3fc826f121d89c5aa4afd7b3408b07e0ff59466b
config: x86_64-randconfig-m001-20200925 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 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/phy/dp83869.c:205 dp83869_set_wol() warn: impossible condition 
'(val_rxcfg < 0) => (0-u16max < 0)'
drivers/net/phy/dp83869.c:209 dp83869_set_wol() warn: impossible condition 
'(val_micr < 0) => (0-u16max < 0)'
drivers/net/phy/dp83869.c:301 dp83869_get_wol() warn: impossible condition 
'(value < 0) => (0-u16max < 0)'
drivers/net/phy/dp83869.c:318 dp83869_get_wol() warn: impossible condition 
'(sopass_val < 0) => (0-u16max < 0)'

Old smatch warnings:
drivers/net/phy/dp83869.c:328 dp83869_get_wol() warn: impossible condition 
'(sopass_val < 0) => (0-u16max < 0)'
drivers/net/phy/dp83869.c:338 dp83869_get_wol() warn: impossible condition 
'(sopass_val < 0) => (0-u16max < 0)'

vim +205 drivers/net/phy/dp83869.c

cfd39675171ca5b Dan Murphy 2020-09-24  196  static int dp83869_set_wol(struct 
phy_device *phydev,
cfd39675171ca5b Dan Murphy 2020-09-24  197                         struct 
ethtool_wolinfo *wol)
cfd39675171ca5b Dan Murphy 2020-09-24  198  {
cfd39675171ca5b Dan Murphy 2020-09-24  199      struct net_device *ndev = 
phydev->attached_dev;
cfd39675171ca5b Dan Murphy 2020-09-24  200      u16 val_rxcfg, val_micr;
cfd39675171ca5b Dan Murphy 2020-09-24  201      u8 *mac;
cfd39675171ca5b Dan Murphy 2020-09-24  202      int ret;
cfd39675171ca5b Dan Murphy 2020-09-24  203  
cfd39675171ca5b Dan Murphy 2020-09-24  204      val_rxcfg = 
phy_read_mmd(phydev, DP83869_DEVADDR, DP83869_RXFCFG);
cfd39675171ca5b Dan Murphy 2020-09-24 @205      if (val_rxcfg < 0)
                                                    ^^^^^^^^^^^^^
This needs to be int instead of u16.

cfd39675171ca5b Dan Murphy 2020-09-24  206              return val_rxcfg;
cfd39675171ca5b Dan Murphy 2020-09-24  207  
cfd39675171ca5b Dan Murphy 2020-09-24  208      val_micr = phy_read(phydev, 
MII_DP83869_MICR);
cfd39675171ca5b Dan Murphy 2020-09-24 @209      if (val_micr < 0)
cfd39675171ca5b Dan Murphy 2020-09-24  210              return val_micr;
cfd39675171ca5b Dan Murphy 2020-09-24  211  
cfd39675171ca5b Dan Murphy 2020-09-24  212      if (wol->wolopts & (WAKE_MAGIC 
| WAKE_MAGICSECURE | WAKE_UCAST |
cfd39675171ca5b Dan Murphy 2020-09-24  213                          
WAKE_BCAST)) {

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- kbu...@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org

Reply via email to