Re: [PATCH v2] net: dsa: bcm_sf2: Propagate error value from mdio_write

From: kbuild test robot
Date: Wed Dec 26 2018 - 16:03:57 EST


Hi Kangjie,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]
[also build test WARNING on v4.20 next-20181224]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Kangjie-Lu/net-dsa-bcm_sf2-Propagate-error-value-from-mdio_write/20181227-042915
config: x86_64-randconfig-x002-201851 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All warnings (new ones prefixed by >>):

drivers/net//dsa/bcm_sf2.c: In function 'bcm_sf2_sw_mdio_write':
>> drivers/net//dsa/bcm_sf2.c:310:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^

vim +310 drivers/net//dsa/bcm_sf2.c

461cd1b03 Florian Fainelli 2016-06-07 296
461cd1b03 Florian Fainelli 2016-06-07 297 static int bcm_sf2_sw_mdio_write(struct mii_bus *bus, int addr, int regnum,
461cd1b03 Florian Fainelli 2016-06-07 298 u16 val)
461cd1b03 Florian Fainelli 2016-06-07 299 {
461cd1b03 Florian Fainelli 2016-06-07 300 struct bcm_sf2_priv *priv = bus->priv;
461cd1b03 Florian Fainelli 2016-06-07 301
461cd1b03 Florian Fainelli 2016-06-07 302 /* Intercept writes to the Broadcom pseudo-PHY address, else,
461cd1b03 Florian Fainelli 2016-06-07 303 * send them to our master MDIO bus controller
461cd1b03 Florian Fainelli 2016-06-07 304 */
461cd1b03 Florian Fainelli 2016-06-07 305 if (addr == BRCM_PSEUDO_PHY_ADDR && priv->indir_phy_mask & BIT(addr))
461cd1b03 Florian Fainelli 2016-06-07 306 bcm_sf2_sw_indir_rw(priv, 0, addr, regnum, val);
461cd1b03 Florian Fainelli 2016-06-07 307 else
9d3b8e48b Kangjie Lu 2018-12-26 308 return mdiobus_write_nested(priv->master_mii_bus,
9d3b8e48b Kangjie Lu 2018-12-26 309 addr, regnum, val);
461cd1b03 Florian Fainelli 2016-06-07 @310 }
461cd1b03 Florian Fainelli 2016-06-07 311

:::::: The code at line 310 was first introduced by commit
:::::: 461cd1b03e321e9c4ed1b831c80965c69a7b761b net: dsa: bcm_sf2: Register our slave MDIO bus

:::::: TO: Florian Fainelli <f.fainelli@xxxxxxxxx>
:::::: CC: David S. Miller <davem@xxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip