RE: [bug report] dpaa2-eth: add MAC/PHY support through phylink

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

 



> Subject: [bug report] dpaa2-eth: add MAC/PHY support through phylink
> 
> Hello Ioana Ciornei,
> 
> The patch 719479230893: "dpaa2-eth: add MAC/PHY support through
> phylink" from Oct 31, 2019, leads to the following static checker
> warning:
> 
> 	drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c:55
> dpaa2_mac_get_if_mode()
> 	warn: always true condition '(if_mode >= 0) => (0-u32max >= 0)'
> 
> drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
>     44  static int dpaa2_mac_get_if_mode(struct device_node *node,
>     45                                   struct dpmac_attr attr)
>     46  {
>     47          phy_interface_t if_mode;
>     48          int err;
>     49
>     50          err = of_get_phy_mode(node, &if_mode);
>     51          if (!err)
>     52                  return if_mode;
>     53
>     54          if_mode = phy_mode(attr.eth_if);
>     55          if (if_mode >= 0)
>                     ^^^^^^^^^^^^
> This enum is unsigned so the condition is always true.
> 
>     56                  return if_mode;
>     57
>     58          return -ENODEV;
>     59  }
> 
> regards,
> dan carpenter

Thanks for the bug report, will send a fix.

Ioana




[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