Linux IIO development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
	Matti Vaittinen <mazziesaccount@gmail.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Nuno Sa <nuno.sa@analog.com>,
	David Lechner <dlechner@baylibre.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/5] iio: adc: Support ROHM BD79124 ADC
Date: Fri, 7 Feb 2025 06:42:58 +0800	[thread overview]
Message-ID: <202502070654.5T9Nk6dN-lkp@intel.com> (raw)
In-Reply-To: <4781e1b1f074ca6c84ecc084b152885d08e826cc.1738761899.git.mazziesaccount@gmail.com>

Hi Matti,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 5bc55a333a2f7316b58edc7573e8e893f7acb532]

url:    https://github.com/intel-lab-lkp/linux/commits/Matti-Vaittinen/dt-bindings-ROHM-BD79124-ADC-GPO/20250205-214127
base:   5bc55a333a2f7316b58edc7573e8e893f7acb532
patch link:    https://lore.kernel.org/r/4781e1b1f074ca6c84ecc084b152885d08e826cc.1738761899.git.mazziesaccount%40gmail.com
patch subject: [PATCH v2 3/5] iio: adc: Support ROHM BD79124 ADC
config: i386-randconfig-004-20250207 (https://download.01.org/0day-ci/archive/20250207/202502070654.5T9Nk6dN-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250207/202502070654.5T9Nk6dN-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/202502070654.5T9Nk6dN-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/iio/adc/rohm-bd79124.c:1072:29: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
    1072 |                 return dev_err_probe(dev, ret, "Failed to get the Vdd\n");
         |                                           ^~~
   drivers/iio/adc/rohm-bd79124.c:1057:9: note: initialize the variable 'ret' to silence this warning
    1057 |         int ret;
         |                ^
         |                 = 0
   1 warning generated.


vim +/ret +1072 drivers/iio/adc/rohm-bd79124.c

  1049	
  1050	static int bd79124_probe(struct i2c_client *i2c)
  1051	{
  1052		struct bd79124_data *data;
  1053		struct iio_dev *iio_dev;
  1054		const struct iio_chan_spec *template;
  1055		struct iio_chan_spec *cs;
  1056		struct device *dev = &i2c->dev;
  1057		int ret;
  1058	
  1059		iio_dev = devm_iio_device_alloc(dev, sizeof(*data));
  1060		if (!iio_dev)
  1061			return -ENOMEM;
  1062	
  1063		data = iio_priv(iio_dev);
  1064		data->dev = dev;
  1065		data->map = devm_regmap_init_i2c(i2c, &bd79124_regmap);
  1066		if (IS_ERR(data->map))
  1067			return dev_err_probe(dev, PTR_ERR(data->map),
  1068					     "Failed to initialize Regmap\n");
  1069	
  1070		data->vmax = devm_regulator_get_enable_read_voltage(dev, "vdd");
  1071		if (data->vmax < 0)
> 1072			return dev_err_probe(dev, ret, "Failed to get the Vdd\n");
  1073	
  1074		ret = devm_regulator_get_enable(dev, "iovdd");
  1075		if (ret < 0)
  1076			return dev_err_probe(dev, ret, "Failed to enable I/O voltage\n");
  1077	
  1078		ret = devm_delayed_work_autocancel(dev, &data->alm_enable_work,
  1079						   bd79124_alm_enable_worker);
  1080		if (ret)
  1081			return ret;
  1082	
  1083		if (i2c->irq) {
  1084			template = &bd79124_chan_template;
  1085		} else {
  1086			template = &bd79124_chan_template_noirq;
  1087			dev_dbg(dev, "No IRQ found, events disabled\n");
  1088		}
  1089		ret = devm_iio_adc_device_alloc_chaninfo(dev, template, &cs);
  1090		if (ret < 0)
  1091			return ret;
  1092	
  1093		iio_dev->channels = cs;
  1094		iio_dev->num_channels = ret;
  1095		iio_dev->info = &bd79124_info;
  1096		iio_dev->name = "bd79124";
  1097		iio_dev->modes = INDIO_DIRECT_MODE;
  1098	
  1099		data->gc = bd79124gpo_chip;
  1100		data->gc.parent = dev;
  1101	
  1102		mutex_init(&data->mutex);
  1103	
  1104		ret = bd79124_hw_init(data);
  1105		if (ret)
  1106			return ret;
  1107	
  1108		ret = devm_gpiochip_add_data(data->dev, &data->gc, data);
  1109		if (ret)
  1110			return dev_err_probe(data->dev, ret, "gpio init Failed\n");
  1111	
  1112		if (i2c->irq > 0) {
  1113			ret = devm_request_threaded_irq(data->dev, i2c->irq,
  1114						bd79124_irq_handler,
  1115						&bd79124_event_handler, IRQF_ONESHOT,
  1116						"adc-thresh-alert", iio_dev);
  1117			if (ret)
  1118				return dev_err_probe(data->dev, ret,
  1119						     "Failed to register IRQ\n");
  1120		}
  1121	
  1122		return devm_iio_device_register(data->dev, iio_dev);
  1123	}
  1124	

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

  reply	other threads:[~2025-02-06 22:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05 13:34 [PATCH v2 0/5] Support ROHM BD79124 ADC/GPO Matti Vaittinen
2025-02-05 13:34 ` [PATCH v2 1/5] dt-bindings: " Matti Vaittinen
2025-02-05 20:03   ` Conor Dooley
2025-02-06  8:39     ` Matti Vaittinen
2025-02-06 18:16       ` Conor Dooley
2025-02-05 13:34 ` [PATCH v2 2/5] iio: adc: add helpers for parsing ADC nodes Matti Vaittinen
2025-02-08 16:41   ` Jonathan Cameron
2025-02-11  8:52     ` Matti Vaittinen
2025-02-11 19:07       ` Jonathan Cameron
2025-02-16 17:50         ` David Lechner
2025-02-17  6:29           ` Matti Vaittinen
2025-02-17 16:05             ` David Lechner
2025-02-17  7:08         ` Matti Vaittinen
2025-02-17 14:24         ` Matti Vaittinen
2025-02-05 13:38 ` [PATCH v2 3/5] iio: adc: Support ROHM BD79124 ADC Matti Vaittinen
2025-02-06 22:42   ` kernel test robot [this message]
2025-02-08 16:52   ` Jonathan Cameron
2025-02-11  9:06     ` Matti Vaittinen
2025-02-11 19:19       ` Jonathan Cameron
2025-02-05 13:38 ` [PATCH v2 4/5] MAINTAINERS: Add IIO ADC helpers Matti Vaittinen
2025-02-05 13:38 ` [PATCH v2 5/5] MAINTAINERS: Add ROHM BD79124 ADC/GPO Matti Vaittinen

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=202502070654.5T9Nk6dN-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.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=matti.vaittinen@fi.rohmeurope.com \
    --cc=mazziesaccount@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox