Hi Pavel, I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master] [also build test WARNING on v4.20-rc6 next-20181214] [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/Pavel-Machek/mv88e6060-Allow-the-driver-to-be-probed-from-device-tree/20181207-013430 config: x86_64-allmodconfig (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/mv88e6060.c:316:48: warning: incorrect type in initializer >> (different modifiers) drivers/net/dsa/mv88e6060.c:316:48: expected char *name drivers/net/dsa/mv88e6060.c:316:48: got char const * drivers/net/dsa/mv88e6060.c: In function 'mv88e6060_probe': drivers/net/dsa/mv88e6060.c:316:16: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] char *name = mv88e6060_get_name(mdiodev->bus, addr); ^~~~~~~~~~~~~~~~~~ drivers/net/dsa/mv88e6060.c:317:34: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'struct mii_bus *' [-Wformat=] printk("e6060: got name %s @ %lx %lx\n", name, mdiodev->bus, addr); ~~^ ~~~~~~~~~~~~ drivers/net/dsa/mv88e6060.c:317:38: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'int' [-Wformat=] printk("e6060: got name %s @ %lx %lx\n", name, mdiodev->bus, addr); ~~^ %x drivers/net/dsa/mv88e6060.c:307:6: warning: unused variable 'err' [-Wunused-variable] int err; ^~~ drivers/net/dsa/mv88e6060.c:306:6: warning: unused variable 'eeprom_len' [-Wunused-variable] u32 eeprom_len; ^~~~~~~~~~ drivers/net/dsa/mv88e6060.c:304:31: warning: unused variable 'compat_info' [-Wunused-variable] const struct mv88e6060_info *compat_info; ^~~~~~~~~~~ drivers/net/dsa/mv88e6060.c:303:22: warning: unused variable 'np' [-Wunused-variable] struct device_node *np = dev->of_node; ^~ drivers/net/dsa/mv88e6060.c: In function 'mv88e6060_remove': drivers/net/dsa/mv88e6060.c:344:25: warning: unused variable 'chip' [-Wunused-variable] struct mv88e6060_chip *chip = ds->priv; ^~~~ vim +316 drivers/net/dsa/mv88e6060.c 299 300 static int mv88e6060_probe(struct mdio_device *mdiodev) 301 { 302 struct device *dev = &mdiodev->dev; 303 struct device_node *np = dev->of_node; 304 const struct mv88e6060_info *compat_info; 305 struct mv88e6060_priv *chip; 306 u32 eeprom_len; 307 int err; 308 309 int addr = 0x10 /* mdiodev->addr */ ; 310 311 chip = alloc_priv(dev, mdiodev->bus, addr); 312 if (!chip) 313 return -ENOMEM; 314 315 { > 316 char *name = mv88e6060_get_name(mdiodev->bus, addr); 317 printk("e6060: got name %s @ %lx %lx\n", name, mdiodev->bus, addr); 318 } 319 { 320 struct dsa_switch *ds; 321 322 ds = dsa_switch_alloc(dev, 6); 323 if (!ds) 324 return -ENOMEM; 325 326 ds->priv = chip; 327 ds->dev = dev; 328 ds->ops = &mv88e6060_switch_ops; 329 ds->ageing_time_min = 15000; 330 ds->ageing_time_max = 15000 * U8_MAX; 331 332 dev_set_drvdata(dev, ds); 333 334 return dsa_register_switch(ds); 335 } 336 337 printk("e6060: probe ok\n"); 338 return 0; 339 } 340 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: application/gzip