public inbox for linux-kernel-mentees@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Shrikant Raskar <raskar.shree97@gmail.com>,
	jic23@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, dlechner@baylibre.com,
	nuno.sa@analog.com, andy@kernel.org, matt@ranostay.sg,
	skhan@linuxfoundation.org, david.hunter.linux@gmail.com,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-kernel-mentees@lists.linux.dev,
	Shrikant Raskar <raskar.shree97@gmail.com>
Subject: Re: [PATCH 2/2] iio: health: max30100: Add pulse-width configuration via DT
Date: Thu, 9 Oct 2025 21:28:19 +0800	[thread overview]
Message-ID: <202510092124.rc01eF4I-lkp@intel.com> (raw)
In-Reply-To: <20251004015623.7019-3-raskar.shree97@gmail.com>

Hi Shrikant,

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.17 next-20251008]
[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/Shrikant-Raskar/dt-bindings-iio-max30100-Add-pulse-width-property/20251004-095849
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link:    https://lore.kernel.org/r/20251004015623.7019-3-raskar.shree97%40gmail.com
patch subject: [PATCH 2/2] iio: health: max30100: Add pulse-width configuration via DT
config: arm-randconfig-r073-20251004 (https://download.01.org/0day-ci/archive/20251009/202510092124.rc01eF4I-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 8.5.0

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/202510092124.rc01eF4I-lkp@intel.com/

smatch warnings:
drivers/iio/health/max30100.c:346 max30100_chip_init() warn: unsigned 'pulse_width' is never less than zero.
drivers/iio/health/max30100.c:346 max30100_chip_init() warn: error code type promoted to positive: 'pulse_width'

vim +/pulse_width +346 drivers/iio/health/max30100.c

   326	
   327	static int max30100_chip_init(struct max30100_data *data)
   328	{
   329		int ret;
   330		unsigned int pulse_us;
   331		unsigned int pulse_width;
   332		struct device *dev = &data->client->dev;
   333	
   334		/* setup LED current settings */
   335		ret = max30100_led_init(data);
   336		if (ret)
   337			return ret;
   338	
   339		/* Get pulse width from DT, default = 1600us */
   340		ret = device_property_read_u32(dev, "maxim,pulse-width", &pulse_us);
   341		if (ret) {
   342			dev_warn(dev, "no pulse-width defined, defaulting to 1600us\n");
   343			pulse_width = MAX30100_REG_SPO2_CONFIG_1600US;
   344		} else {
   345			pulse_width = max30100_get_pulse_width(pulse_us);
 > 346			if (pulse_width < 0) {
   347				dev_err(dev, "invalid pulse-width %u\n", pulse_us);
   348				return pulse_width;
   349			}
   350		}
   351	
   352		/* enable hi-res SPO2 readings at 100Hz */
   353		ret = regmap_write(data->regmap, MAX30100_REG_SPO2_CONFIG,
   354					 MAX30100_REG_SPO2_CONFIG_HI_RES_EN |
   355					 MAX30100_REG_SPO2_CONFIG_100HZ |
   356					 pulse_width);
   357		if (ret)
   358			return ret;
   359	
   360		/* enable SPO2 mode */
   361		ret = regmap_update_bits(data->regmap, MAX30100_REG_MODE_CONFIG,
   362					 MAX30100_REG_MODE_CONFIG_MODE_MASK,
   363					 MAX30100_REG_MODE_CONFIG_MODE_HR_EN |
   364					 MAX30100_REG_MODE_CONFIG_MODE_SPO2_EN);
   365		if (ret)
   366			return ret;
   367	
   368		/* enable FIFO interrupt */
   369		return regmap_update_bits(data->regmap, MAX30100_REG_INT_ENABLE,
   370					 MAX30100_REG_INT_ENABLE_MASK,
   371					 MAX30100_REG_INT_ENABLE_FIFO_EN
   372					 << MAX30100_REG_INT_ENABLE_MASK_SHIFT);
   373	}
   374	

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

      parent reply	other threads:[~2025-10-09 13:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-04  1:56 [PATCH 0/2] iio: health: max30100: Add DT pulse-width support Shrikant Raskar
2025-10-04  1:56 ` [PATCH 1/2] dt-bindings: iio: max30100: Add pulse-width property Shrikant Raskar
2025-10-04  3:22   ` Bhanu Seshu Kumar Valluri
2025-10-04  6:19     ` Shrikant
2025-10-04 13:12   ` Jonathan Cameron
2025-10-06  3:04     ` Shrikant
2025-10-12 14:11       ` Jonathan Cameron
2025-10-12 16:52         ` Shrikant
2025-10-06 14:40   ` Krzysztof Kozlowski
2025-10-04  1:56 ` [PATCH 2/2] iio: health: max30100: Add pulse-width configuration via DT Shrikant Raskar
2025-10-04 13:16   ` Jonathan Cameron
2025-10-09 13:28   ` kernel test robot [this message]

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=202510092124.rc01eF4I-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=david.hunter.linux@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel-mentees@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@ranostay.sg \
    --cc=nuno.sa@analog.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=raskar.shree97@gmail.com \
    --cc=robh@kernel.org \
    --cc=skhan@linuxfoundation.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