[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202206221821.YTh0dW9N-lkp@intel.com>
Date: Wed, 22 Jun 2022 18:27:57 +0800
From: kernel test robot <lkp@...el.com>
To: Clément Léger <clement.leger@...tlin.com>,
Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Magnus Damm <magnus.damm@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
Jose Abreu <joabreu@...opsys.com>
Cc: kbuild-all@...ts.01.org,
Clément Léger <clement.leger@...tlin.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Herve Codina <herve.codina@...tlin.com>,
Miquèl Raynal <miquel.raynal@...tlin.com>,
Milan Stevanovic <milan.stevanovic@...com>,
Jimmy Lalande <jimmy.lalande@...com>,
Pascal Eberhard <pascal.eberhard@...com>,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-renesas-soc@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v8 05/16] net: pcs: add Renesas MII converter
driver
Hi "Clément,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Cl-ment-L-ger/add-support-for-Renesas-RZ-N1-ethernet-subsystem-devices/20220620-191343
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git dbca1596bbb08318f5e3b3b99f8ca0a0d3830a65
config: ia64-randconfig-r003-20220622 (https://download.01.org/0day-ci/archive/20220622/202206221821.YTh0dW9N-lkp@intel.com/config)
compiler: ia64-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/fd8100fa88a9cffefe76f27b683803108d39c253
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Cl-ment-L-ger/add-support-for-Renesas-RZ-N1-ethernet-subsystem-devices/20220620-191343
git checkout fd8100fa88a9cffefe76f27b683803108d39c253
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/net/pcs/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/net/pcs/pcs-rzn1-miic.c:501:34: warning: 'miic_of_mtable' defined but not used [-Wunused-const-variable=]
501 | static const struct of_device_id miic_of_mtable[] = {
| ^~~~~~~~~~~~~~
drivers/net/pcs/pcs-rzn1-miic.c: In function 'miic_probe':
>> drivers/net/pcs/pcs-rzn1-miic.c:430:19: warning: 'conf' is used uninitialized [-Wuninitialized]
430 | dt_val[0] = conf;
| ~~~~~~~~~~^~~~~~
drivers/net/pcs/pcs-rzn1-miic.c:424:13: note: 'conf' was declared here
424 | u32 conf;
| ^~~~
vim +/conf +430 drivers/net/pcs/pcs-rzn1-miic.c
418
419 static int miic_parse_dt(struct device *dev, u32 *mode_cfg)
420 {
421 s8 dt_val[MIIC_MODCTRL_CONF_CONV_NUM];
422 struct device_node *np = dev->of_node;
423 struct device_node *conv;
424 u32 conf;
425 int port;
426
427 memset(dt_val, MIIC_MODCTRL_CONF_NONE, sizeof(dt_val));
428
429 of_property_read_u32(np, "renesas,miic-switch-portin", &conf);
> 430 dt_val[0] = conf;
431
432 for_each_child_of_node(np, conv) {
433 if (of_property_read_u32(conv, "reg", &port))
434 continue;
435
436 if (!of_device_is_available(conv))
437 continue;
438
439 if (of_property_read_u32(conv, "renesas,miic-input", &conf) == 0)
440 dt_val[port] = conf;
441 }
442
443 return miic_match_dt_conf(dev, dt_val, mode_cfg);
444 }
445
446 static int miic_probe(struct platform_device *pdev)
447 {
448 struct device *dev = &pdev->dev;
449 struct miic *miic;
450 u32 mode_cfg;
451 int ret;
452
453 ret = miic_parse_dt(dev, &mode_cfg);
454 if (ret < 0)
455 return -EINVAL;
456
457 miic = devm_kzalloc(dev, sizeof(*miic), GFP_KERNEL);
458 if (!miic)
459 return -ENOMEM;
460
461 spin_lock_init(&miic->lock);
462 miic->dev = dev;
463 miic->base = devm_platform_ioremap_resource(pdev, 0);
464 if (!miic->base)
465 return -EINVAL;
466
467 ret = devm_pm_runtime_enable(dev);
468 if (ret < 0)
469 return ret;
470
471 ret = pm_runtime_resume_and_get(dev);
472 if (ret < 0)
473 return ret;
474
475 ret = miic_init_hw(miic, mode_cfg);
476 if (ret)
477 goto disable_runtime_pm;
478
479 /* miic_create() relies on that fact that data are attached to the
480 * platform device to determine if the driver is ready so this needs to
481 * be the last thing to be done after everything is initialized
482 * properly.
483 */
484 platform_set_drvdata(pdev, miic);
485
486 return 0;
487
488 disable_runtime_pm:
489 pm_runtime_put(dev);
490
491 return ret;
492 }
493
494 static int miic_remove(struct platform_device *pdev)
495 {
496 pm_runtime_put(&pdev->dev);
497
498 return 0;
499 }
500
> 501 static const struct of_device_id miic_of_mtable[] = {
502 { .compatible = "renesas,rzn1-miic" },
503 { /* sentinel */ },
504 };
505 MODULE_DEVICE_TABLE(of, miic_of_mtable);
506
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists