public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Clément Léger" <clement.leger@bootlin.com>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Vivien Didelot" <vivien.didelot@gmail.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Vladimir Oltean" <olteanv@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	"Giuseppe Cavallaro" <peppe.cavallaro@st.com>,
	"Jose Abreu" <joabreu@synopsys.com>
Cc: kbuild-all@lists.01.org,
	"Clément Léger" <clement.leger@bootlin.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Herve Codina" <herve.codina@bootlin.com>,
	"Miquèl Raynal" <miquel.raynal@bootlin.com>,
	"Milan Stevanovic" <milan.stevanovic@se.com>,
	"Jimmy Lalande" <jimmy.lalande@se.com>,
	"Pascal Eberhard" <pascal.eberhard@se.com>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v8 05/16] net: pcs: add Renesas MII converter driver
Date: Wed, 22 Jun 2022 18:27:57 +0800	[thread overview]
Message-ID: <202206221821.YTh0dW9N-lkp@intel.com> (raw)
In-Reply-To: <20220620110846.374787-6-clement.leger@bootlin.com>

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@intel.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

  parent reply	other threads:[~2022-06-22 10:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20 11:08 [PATCH net-next v8 00/16] add support for Renesas RZ/N1 ethernet subsystem devices Clément Léger
2022-06-20 11:08 ` [PATCH net-next v8 01/16] net: dsa: allow port_bridge_join() to override extack message Clément Léger
2022-06-20 11:08 ` [PATCH net-next v8 02/16] net: dsa: add support for ethtool get_rmon_stats() Clément Léger
2022-06-20 11:08 ` [PATCH net-next v8 03/16] net: dsa: add Renesas RZ/N1 switch tag driver Clément Léger
2022-06-20 11:08 ` [PATCH net-next v8 04/16] dt-bindings: net: pcs: add bindings for Renesas RZ/N1 MII converter Clément Léger
2022-06-20 11:08 ` [PATCH net-next v8 05/16] net: pcs: add Renesas MII converter driver Clément Léger
2022-06-21 11:44   ` Vladimir Oltean
2022-06-22 10:27   ` kernel test robot [this message]
2022-06-20 11:08 ` [PATCH net-next v8 06/16] dt-bindings: net: dsa: add bindings for Renesas RZ/N1 Advanced 5 port switch Clément Léger
2022-06-20 11:08 ` [PATCH net-next v8 07/16] net: dsa: rzn1-a5psw: add Renesas RZ/N1 advanced 5 port switch driver Clément Léger
2022-06-21 11:49   ` Vladimir Oltean
2022-06-20 11:08 ` [PATCH net-next v8 08/16] net: dsa: rzn1-a5psw: add statistics support Clément Léger
2022-06-20 11:08 ` [PATCH net-next v8 09/16] net: dsa: rzn1-a5psw: add FDB support Clément Léger
2022-06-21 11:51   ` Vladimir Oltean
2022-06-20 11:08 ` [PATCH net-next v8 10/16] dt-bindings: net: snps,dwmac: add "power-domains" property Clément Léger
2022-06-20 11:08 ` [PATCH net-next v8 11/16] dt-bindings: net: snps,dwmac: add "renesas,rzn1" compatible Clément Léger
2022-06-20 11:08 ` [PATCH net-next v8 12/16] ARM: dts: r9a06g032: describe MII converter Clément Léger
2022-06-20 11:08 ` [PATCH net-next v8 13/16] ARM: dts: r9a06g032: describe GMAC2 Clément Léger
2022-06-20 11:08 ` [PATCH net-next v8 14/16] ARM: dts: r9a06g032: describe switch Clément Léger
2022-06-21 11:52   ` Vladimir Oltean
2022-06-20 11:08 ` [PATCH net-next v8 15/16] ARM: dts: r9a06g032-rzn1d400-db: add switch description Clément Léger
2022-06-21 11:56   ` Vladimir Oltean
2022-06-23  8:02     ` Clément Léger
2022-06-20 11:08 ` [PATCH net-next v8 16/16] MAINTAINERS: add Renesas RZ/N1 switch related driver entry Clément Léger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202206221821.YTh0dW9N-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew@lunn.ch \
    --cc=clement.leger@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=herve.codina@bootlin.com \
    --cc=hkallweit1@gmail.com \
    --cc=jimmy.lalande@se.com \
    --cc=joabreu@synopsys.com \
    --cc=kbuild-all@lists.01.org \
    --cc=krzk@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=magnus.damm@gmail.com \
    --cc=milan.stevanovic@se.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=pascal.eberhard@se.com \
    --cc=peppe.cavallaro@st.com \
    --cc=robh+dt@kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox