All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: phy: Fix unsigned comparison with less than zero
@ 2021-10-27  8:59 Jiapeng Chong
  2021-10-27  9:06 ` Russell King (Oracle)
  2021-10-28  1:29 ` Jakub Kicinski
  0 siblings, 2 replies; 3+ messages in thread
From: Jiapeng Chong @ 2021-10-27  8:59 UTC (permalink / raw)
  To: andrew
  Cc: hkallweit1, linux, davem, kuba, lgirdwood, broonie, netdev,
	linux-kernel, Jiapeng Chong

Fix the following coccicheck warning:

./drivers/net/phy/at803x.c:493:5-10: WARNING: Unsigned expression
compared with zero: value < 0.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Fixes: ea13c9ee855c ("drivers: net: phy: at803x: separate wol specific code to wol standard apis")
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/net/phy/at803x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
index f1cbe1f..dae95d9 100644
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
@@ -484,7 +484,7 @@ static int at803x_set_wol(struct phy_device *phydev,
 static void at803x_get_wol(struct phy_device *phydev,
 			   struct ethtool_wolinfo *wol)
 {
-	u32 value;
+	int value;
 
 	wol->supported = WAKE_MAGIC;
 	wol->wolopts = 0;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: phy: Fix unsigned comparison with less than zero
  2021-10-27  8:59 [PATCH] net: phy: Fix unsigned comparison with less than zero Jiapeng Chong
@ 2021-10-27  9:06 ` Russell King (Oracle)
  2021-10-28  1:29 ` Jakub Kicinski
  1 sibling, 0 replies; 3+ messages in thread
From: Russell King (Oracle) @ 2021-10-27  9:06 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: andrew, hkallweit1, davem, kuba, lgirdwood, broonie, netdev,
	linux-kernel

On Wed, Oct 27, 2021 at 04:59:51PM +0800, Jiapeng Chong wrote:
> Fix the following coccicheck warning:
> 
> ./drivers/net/phy/at803x.c:493:5-10: WARNING: Unsigned expression
> compared with zero: value < 0.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Fixes: ea13c9ee855c ("drivers: net: phy: at803x: separate wol specific code to wol standard apis")
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Thanks!

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: phy: Fix unsigned comparison with less than zero
  2021-10-27  8:59 [PATCH] net: phy: Fix unsigned comparison with less than zero Jiapeng Chong
  2021-10-27  9:06 ` Russell King (Oracle)
@ 2021-10-28  1:29 ` Jakub Kicinski
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2021-10-28  1:29 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: andrew, hkallweit1, linux, davem, lgirdwood, broonie, netdev

On Wed, 27 Oct 2021 16:59:51 +0800 Jiapeng Chong wrote:
> Fix the following coccicheck warning:
> 
> ./drivers/net/phy/at803x.c:493:5-10: WARNING: Unsigned expression
> compared with zero: value < 0.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Fixes: ea13c9ee855c ("drivers: net: phy: at803x: separate wol specific code to wol standard apis")

Please pay more attention.

This is not a correct fixes tag, take a look at the code, the
comparison was introduced in 7beecaf7d507 ("net: phy: at803x: improve
the WOL feature").

Do not fix spelling of the quoted commits. You replaced seperate
with separate and I had fun time trying to figure out why scripts
complain that the fixes tag is incorrect.

Fixed and applied to net-next.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-28  1:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27  8:59 [PATCH] net: phy: Fix unsigned comparison with less than zero Jiapeng Chong
2021-10-27  9:06 ` Russell King (Oracle)
2021-10-28  1:29 ` Jakub Kicinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.