Skip to contentSkip to conversation

drivers/net/phy/marvell.c:1750:6-9: WARNING: Unsigned expression compared with zero: val < 0 (fwd)

PATCH New Julia Lawall 1 participant 1 message Apr 6, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 18/21 drivers/net/phy/marvell.c:1750:6-9: WARNING: Unsigned expression compared with zero: val < 0 (fwd)

Hello,

Since val is of type u16, it won't be less than 0 (line 1750).

julia

---------- Forwarded message ----------
Date: Mon, 6 Apr 2020 18:17:18 +0800
From: kbuild test robot <[email protected]>
To: kbuild(a)lists.01.org
Cc: lkp(a)intel.com, Julia Lawall <[email protected]>
Subject: [lunn:v5.6-rc5-net-next-cable-test 18/21]
drivers/net/phy/marvell.c:1750:6-9: WARNING: Unsigned expression compared with zero: val < 0

CC: kbuild-all(a)lists.01.org
TO: Andrew Lunn <[email protected]>

tree:   https://github.com/lunn/linux.git v5.6-rc5-net-next-cable-test
head:   58cae081b0f844e3046e85714cbc87448c007c96
commit: 4c86014f86768b1fd2f9cc7c443cc67d90b1b5ba [18/21] net: phy: marvell: Add support for amplitude graph

:::::: branch date: 10 hours ago
:::::: commit date: 10 hours ago

If you fix the issue, kindly add following tag as appropriate

Quoted 1 line
Quoted 1 line

drivers/net/phy/marvell.c:1750:6-9: WARNING: Unsigned expression compared with zero: val < 0

# https://github.com/lunn/linux/commit/4c86014f86768b1fd2f9cc7c443cc67d90b1b5ba
git remote add lunn https://github.com/lunn/linux.git
git remote update lunn
git checkout 4c86014f86768b1fd2f9cc7c443cc67d90b1b5ba
vim +1750 drivers/net/phy/marvell.c

d2fa47d9dd5c5f Andrew Lunn 2015-12-30  1741
4c86014f86768b Andrew Lunn 2019-05-22  1742  static int marvell_vct5_wait_complete(struct phy_device *phydev)
4c86014f86768b Andrew Lunn 2019-05-22  1743  {
4c86014f86768b Andrew Lunn 2019-05-22  1744  	int i;
4c86014f86768b Andrew Lunn 2019-05-22  1745  	u16 val;
4c86014f86768b Andrew Lunn 2019-05-22  1746
4c86014f86768b Andrew Lunn 2019-05-22  1747  	for (i = 0; i < 32; i++) {
4c86014f86768b Andrew Lunn 2019-05-22  1748  		val = phy_read_paged(phydev, MII_MARVELL_VCT5_PAGE,
4c86014f86768b Andrew Lunn 2019-05-22  1749  				     MII_VCT5_CTRL);
4c86014f86768b Andrew Lunn 2019-05-22 @1750  		if (val < 0)
4c86014f86768b Andrew Lunn 2019-05-22  1751  			return val;
4c86014f86768b Andrew Lunn 2019-05-22  1752
4c86014f86768b Andrew Lunn 2019-05-22  1753  		if (val & MII_VCT5_CTRL_COMPLETE)
4c86014f86768b Andrew Lunn 2019-05-22  1754  			return 0;
4c86014f86768b Andrew Lunn 2019-05-22  1755
4c86014f86768b Andrew Lunn 2019-05-22  1756  		usleep_range(1000, 2000);
4c86014f86768b Andrew Lunn 2019-05-22  1757  	}
4c86014f86768b Andrew Lunn 2019-05-22  1758
4c86014f86768b Andrew Lunn 2019-05-22  1759  	phydev_err(phydev, "Timeout while waiting for cable test to finish\n");
4c86014f86768b Andrew Lunn 2019-05-22  1760  	return -ETIMEDOUT;
4c86014f86768b Andrew Lunn 2019-05-22  1761  }
4c86014f86768b Andrew Lunn 2019-05-22  1762

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]