Re: phy: micrel: Add ethtool statistics counters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 05, 2016 at 12:15:45AM +0300, Dan Carpenter wrote:
> Hello Andrew Lunn,
> 
> The patch 2b2427d06426: "phy: micrel: Add ethtool statistics
> counters" from Dec 30, 2015, leads to the following static checker
> warning:
> 
> 	drivers/net/phy/micrel.c:609 kszphy_get_stat()
> 	warn: unsigned 'val' is never less than zero.
> 
> drivers/net/phy/micrel.c
>    602  static u64 kszphy_get_stat(struct phy_device *phydev, int i)
>    603  {
>    604          struct kszphy_hw_stat stat = kszphy_hw_stats[i];
>    605          struct kszphy_priv *priv = phydev->priv;
>    606          u64 val;
>    607  
>    608          val = phy_read(phydev, stat.reg);
>    609          if (val < 0) {
>                     ^^^^^^^
> Unpossible!

Yep, will fix.

You might see the same from the Marvell phy driver...

    Andrew
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux