Re: [PATCH 2/6] net: bcmgenet: refactor phy mode configuration

From: kbuild test robot
Date: Wed Feb 05 2020 - 16:06:11 EST


Hi Jeremy,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on v5.5]
[also build test WARNING on next-20200205]
[cannot apply to net/master net-next/master linus/master ipvs/master]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/Jeremy-Linton/Add-ACPI-bindings-to-the-genet/20200203-101928
base: d5226fa6dbae0569ee43ecfc08bdcd6770fc4755

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

smatch warnings:
drivers/net/ethernet/broadcom/genet/bcmmii.c:485 bcmgenet_phy_interface_init() warn: unsigned 'priv->phy_interface' is never less than zero.

vim +485 drivers/net/ethernet/broadcom/genet/bcmmii.c

479
480 static int bcmgenet_phy_interface_init(struct bcmgenet_priv *priv)
481 {
482 struct device *kdev = &priv->pdev->dev;
483
484 priv->phy_interface = device_get_phy_mode(kdev);
> 485 if (priv->phy_interface < 0) {
486 dev_dbg(kdev, "invalid PHY mode property\n");
487 priv->phy_interface = PHY_INTERFACE_MODE_RGMII;
488 }
489
490 /* We need to specifically look up whether this PHY interface is internal
491 * or not *before* we even try to probe the PHY driver over MDIO as we
492 * may have shut down the internal PHY for power saving purposes.
493 */
494 if (priv->phy_interface == PHY_INTERFACE_MODE_INTERNAL)
495 priv->internal_phy = true;
496
497 return 0;
498 }
499

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation