All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ivan Mikhaylov <fr0st61te@gmail.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, Ivan Mikhaylov <fr0st61te@gmail.com>
Subject: Re: [PATCH v5 2/2] iio: adc: Add driver support for MAX34408/9
Date: Mon, 9 Oct 2023 18:08:39 +0800	[thread overview]
Message-ID: <202310091704.gr3fx4Vo-lkp@intel.com> (raw)
In-Reply-To: <20231007234838.8748-3-fr0st61te@gmail.com>

Hi Ivan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on robh/for-next linus/master v6.6-rc5 next-20231009]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ivan-Mikhaylov/dt-bindings-adc-provide-max34408-9-device-tree-binding-document/20231008-074933
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link:    https://lore.kernel.org/r/20231007234838.8748-3-fr0st61te%40gmail.com
patch subject: [PATCH v5 2/2] iio: adc: Add driver support for MAX34408/9
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20231009/202310091704.gr3fx4Vo-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231009/202310091704.gr3fx4Vo-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310091704.gr3fx4Vo-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/iio/adc/max34408.c:240:31: warning: variable 'i' is uninitialized when used here [-Wuninitialized]
     240 |                                          &max34408->input_rsense[i]);
         |                                                                  ^
   drivers/iio/adc/max34408.c:215:11: note: initialize the variable 'i' to silence this warning
     215 |         int rc, i;
         |                  ^
         |                   = 0
   1 warning generated.


vim +/i +240 drivers/iio/adc/max34408.c

   205	
   206	static int max34408_probe(struct i2c_client *client)
   207	{
   208		const struct max34408_adc_model_data *model_data;
   209		struct device *dev = &client->dev;
   210		const struct of_device_id *match;
   211		struct max34408_data *max34408;
   212		struct fwnode_handle *node;
   213		struct iio_dev *indio_dev;
   214		struct regmap *regmap;
   215		int rc, i;
   216	
   217		match = i2c_of_match_device(max34408_of_match, client);
   218		if (!match)
   219			return -EINVAL;
   220		model_data = i2c_get_match_data(client);
   221	
   222		regmap = devm_regmap_init_i2c(client, &max34408_regmap_config);
   223		if (IS_ERR(regmap)) {
   224			dev_err_probe(dev, PTR_ERR(regmap),
   225				      "regmap_init failed\n");
   226			return PTR_ERR(regmap);
   227		}
   228	
   229		indio_dev = devm_iio_device_alloc(dev, sizeof(*max34408));
   230		if (!indio_dev)
   231			return -ENOMEM;
   232	
   233		max34408 = iio_priv(indio_dev);
   234		max34408->regmap = regmap;
   235		max34408->dev = dev;
   236		mutex_init(&max34408->lock);
   237	
   238		device_for_each_child_node(dev, node) {
   239			fwnode_property_read_u32(node, "maxim,rsense-val-micro-ohms",
 > 240						 &max34408->input_rsense[i]);
   241			i++;
   242		}
   243	
   244		/* disable ALERT and averaging */
   245		rc = regmap_write(max34408->regmap, MAX34408_CONTROL_REG, 0x0);
   246		if (rc)
   247			return rc;
   248	
   249		indio_dev->channels = model_data->channels;
   250		indio_dev->num_channels = model_data->num_channels;
   251		indio_dev->name = model_data->model_name;
   252	
   253		indio_dev->info = &max34408_info;
   254		indio_dev->modes = INDIO_DIRECT_MODE;
   255	
   256		return devm_iio_device_register(dev, indio_dev);
   257	}
   258	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2023-10-09 10:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-07 23:48 [PATCH v5 0/2] Add maxim max34408/34409 ADC driver and yaml Ivan Mikhaylov
2023-10-07 23:48 ` [PATCH v5 1/2] dt-bindings: adc: provide max34408/9 device tree binding document Ivan Mikhaylov
2023-10-10 14:33   ` Rob Herring
2023-10-10 14:40   ` Jonathan Cameron
2023-10-10 20:22     ` Ivan Mikhaylov
2023-10-12  7:40       ` Jonathan Cameron
2023-10-12 16:27         ` Ivan Mikhaylov
2023-10-13  8:19           ` Jonathan Cameron
2023-10-13  8:35             ` Krzysztof Kozlowski
2023-10-13  9:09               ` Jonathan Cameron
2023-10-13  9:53                 ` Krzysztof Kozlowski
2023-10-13 18:12                   ` Jonathan Cameron
2023-10-07 23:48 ` [PATCH v5 2/2] iio: adc: Add driver support for MAX34408/9 Ivan Mikhaylov
2023-10-09 10:08   ` kernel test robot [this message]
2023-10-10 15:24   ` Jonathan Cameron

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=202310091704.gr3fx4Vo-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fr0st61te@gmail.com \
    --cc=jic23@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh+dt@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.