lkml.org 
[lkml]   [2020]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[kbuild] Re: [PATCH net-next v4 1/2] net: phy: dp83869: support Wake on LAN
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 <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@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-all@lists.01.org
[unhandled content-type:application/gzip]_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org
\
 
 \ /
  Last update: 2020-09-25 14:41    [W:0.044 / U:1.996 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site