linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Subject: Re: [PATCH v1 3/3] iio: adc: meson_saradc: Use temporary variable for struct device
Date: Wed, 1 Jun 2022 08:44:16 +0800	[thread overview]
Message-ID: <202206010812.Xy2yMeXw-lkp@intel.com> (raw)
In-Reply-To: <20220531211842.71998-3-andriy.shevchenko@linux.intel.com>

Hi Andy,

I love your patch! Perhaps something to improve:

[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on v5.18 next-20220531]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/iio-adc-meson_saradc-Convert-to-use-dev_err_probe/20220601-052117
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20220601/202206010812.Xy2yMeXw-lkp@intel.com/config)
compiler: m68k-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/d2d128394df620a157f32fab808d46e5983f73e5
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Andy-Shevchenko/iio-adc-meson_saradc-Convert-to-use-dev_err_probe/20220601-052117
        git checkout d2d128394df620a157f32fab808d46e5983f73e5
        # 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=m68k SHELL=/bin/bash drivers/iio/

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/iio/adc/meson_saradc.c: In function 'meson_sar_adc_clk_init':
>> drivers/iio/adc/meson_saradc.c:652:24: warning: 'dev' is used uninitialized [-Wuninitialized]
     652 |         struct device *dev = dev->parent;
         |                        ^~~


vim +/dev +652 drivers/iio/adc/meson_saradc.c

   646	
   647	static int meson_sar_adc_clk_init(struct iio_dev *indio_dev,
   648					  void __iomem *base)
   649	{
   650		struct meson_sar_adc_priv *priv = iio_priv(indio_dev);
   651		struct device *idev = &indio_dev->dev;
 > 652		struct device *dev = dev->parent;
   653		struct clk_init_data init;
   654		const char *clk_parents[1];
   655	
   656		init.name = devm_kasprintf(idev, GFP_KERNEL, "%s#adc_div", dev_name(dev));
   657		if (!init.name)
   658			return -ENOMEM;
   659	
   660		init.flags = 0;
   661		init.ops = &clk_divider_ops;
   662		clk_parents[0] = __clk_get_name(priv->clkin);
   663		init.parent_names = clk_parents;
   664		init.num_parents = 1;
   665	
   666		priv->clk_div.reg = base + MESON_SAR_ADC_REG3;
   667		priv->clk_div.shift = MESON_SAR_ADC_REG3_ADC_CLK_DIV_SHIFT;
   668		priv->clk_div.width = MESON_SAR_ADC_REG3_ADC_CLK_DIV_WIDTH;
   669		priv->clk_div.hw.init = &init;
   670		priv->clk_div.flags = 0;
   671	
   672		priv->adc_div_clk = devm_clk_register(idev, &priv->clk_div.hw);
   673		if (WARN_ON(IS_ERR(priv->adc_div_clk)))
   674			return PTR_ERR(priv->adc_div_clk);
   675	
   676		init.name = devm_kasprintf(idev, GFP_KERNEL, "%s#adc_en", dev_name(dev));
   677		if (!init.name)
   678			return -ENOMEM;
   679	
   680		init.flags = CLK_SET_RATE_PARENT;
   681		init.ops = &clk_gate_ops;
   682		clk_parents[0] = __clk_get_name(priv->adc_div_clk);
   683		init.parent_names = clk_parents;
   684		init.num_parents = 1;
   685	
   686		priv->clk_gate.reg = base + MESON_SAR_ADC_REG3;
   687		priv->clk_gate.bit_idx = __ffs(MESON_SAR_ADC_REG3_CLK_EN);
   688		priv->clk_gate.hw.init = &init;
   689	
   690		priv->adc_clk = devm_clk_register(idev, &priv->clk_gate.hw);
   691		if (WARN_ON(IS_ERR(priv->adc_clk)))
   692			return PTR_ERR(priv->adc_clk);
   693	
   694		return 0;
   695	}
   696	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  parent reply	other threads:[~2022-06-01  0:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31 21:18 [PATCH v1 1/3] iio: adc: meson_saradc: Convert to use dev_err_probe() Andy Shevchenko
2022-05-31 21:18 ` [PATCH v1 2/3] iio: adc: meson_saradc: Use devm_clk_get_optional() Andy Shevchenko
2022-05-31 21:29   ` Martin Blumenstingl
2022-05-31 21:18 ` [PATCH v1 3/3] iio: adc: meson_saradc: Use temporary variable for struct device Andy Shevchenko
2022-05-31 21:47   ` Martin Blumenstingl
2022-06-01 10:30     ` Andy Shevchenko
2022-06-01  0:44   ` kernel test robot [this message]
2022-05-31 21:53 ` [PATCH v1 1/3] iio: adc: meson_saradc: Convert to use dev_err_probe() Martin Blumenstingl

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=202206010812.Xy2yMeXw-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jbrunet@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=khilman@baylibre.com \
    --cc=lars@metafoo.de \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=narmstrong@baylibre.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;
as well as URLs for NNTP newsgroup(s).