Re: [bug report] net: phy: mscc: migrate to phy_select/restore_page functions

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

 



Hi Dan,

On Wed, Oct 10, 2018 at 02:04:31PM +0300, Dan Carpenter wrote:
> Hello Quentin Schulz,
> 
> The patch 6a0bfbbe20b0: "net: phy: mscc: migrate to
> phy_select/restore_page functions" from Oct 8, 2018, leads to the
> following static checker warning:
> 
> 	drivers/net/phy/mscc.c:529 vsc85xx_downshift_get()
> 	warn: impossible condition '(reg_val < 0) => (0-u16max < 0)'
> 
> drivers/net/phy/mscc.c
>    523  static int vsc85xx_downshift_get(struct phy_device *phydev, u8 *count)
>    524  {
>    525          u16 reg_val;
>                 ^^^^^^^^^^^^
>    526  
>    527          reg_val = phy_read_paged(phydev, MSCC_PHY_PAGE_EXTENDED,
>    528                                   MSCC_PHY_ACTIPHY_CNTL);
>    529          if (reg_val < 0)
>                     ^^^^^^^^^^^
> Impossible
> 
>    530                  return reg_val;
>    531  
>    532          reg_val &= DOWNSHIFT_CNTL_MASK;
>    533          if (!(reg_val & DOWNSHIFT_EN))
>    534                  *count = DOWNSHIFT_DEV_DISABLE;
>    535          else
>    536                  *count = ((reg_val & ~DOWNSHIFT_EN) >> DOWNSHIFT_CNTL_POS) + 2;
>    537  
>    538          return 0;
>    539  }
> 
> 

A patch has already been suggested.

Thanks,
Quentin

Attachment: signature.asc
Description: PGP signature


[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