linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Dan Murphy <dmurphy@ti.com>,
	davem@davemloft.net, andrew@lunn.ch, f.fainelli@gmail.com,
	hkallweit1@gmail.com
Cc: lkp@intel.com, kbuild-all@lists.01.org, mkubecek@suse.cz,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Dan Murphy <dmurphy@ti.com>
Subject: [kbuild] Re: [PATCH net-next v4 1/2] net: phy: dp83869: support Wake on LAN
Date: Fri, 25 Sep 2020 15:38:58 +0300	[thread overview]
Message-ID: <20200925123858.GX18329@kadam> (raw)
In-Reply-To: <20200924162707.14093-2-dmurphy@ti.com>

[-- Attachment #1: Type: text/plain, Size: 2731 bytes --]

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 

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30892 bytes --]

[-- Attachment #3: Type: text/plain, Size: 149 bytes --]

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

  reply	other threads:[~2020-09-25 12:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24 16:27 [PATCH net-next v4 0/2] DP83869 WoL and Speed optimization Dan Murphy
2020-09-24 16:27 ` [PATCH net-next v4 1/2] net: phy: dp83869: support Wake on LAN Dan Murphy
2020-09-25 12:38   ` Dan Carpenter [this message]
2020-09-24 16:27 ` [PATCH net-next v4 2/2] net: phy: dp83869: Add speed optimization feature Dan Murphy

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=20200925123858.GX18329@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dmurphy@ti.com \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).