public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Javier Carrasco <javier.carrasco.cruz@gmail.com>,
	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>,
	Rishi Gupta <gupt21@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-iio@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Javier Carrasco <javier.carrasco.cruz@gmail.com>
Subject: Re: [PATCH 2/2] iio: light: add support for veml6031x00 ALS series
Date: Thu, 28 Nov 2024 17:55:28 +0800	[thread overview]
Message-ID: <202411281741.xz7mD4E2-lkp@intel.com> (raw)
In-Reply-To: <20241126-veml6031x00-v1-2-4affa62bfefd@gmail.com>

Hi Javier,

kernel test robot noticed the following build warnings:

[auto build test WARNING on a61ff7eac77e86de828fe28c4e42b8ae9ec2b195]

url:    https://github.com/intel-lab-lkp/linux/commits/Javier-Carrasco/dt-bindings-iio-light-veml6030-add-veml6031x00-ALS-series/20241128-104104
base:   a61ff7eac77e86de828fe28c4e42b8ae9ec2b195
patch link:    https://lore.kernel.org/r/20241126-veml6031x00-v1-2-4affa62bfefd%40gmail.com
patch subject: [PATCH 2/2] iio: light: add support for veml6031x00 ALS series
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20241128/202411281741.xz7mD4E2-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241128/202411281741.xz7mD4E2-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/202411281741.xz7mD4E2-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/iio/light/veml6031x00.c: In function 'veml6031x00_set_scale':
>> drivers/iio/light/veml6031x00.c:422:24: warning: variable 'gain_idx' set but not used [-Wunused-but-set-variable]
     422 |         int new_scale, gain_idx;
         |                        ^~~~~~~~


vim +/gain_idx +422 drivers/iio/light/veml6031x00.c

   418	
   419	static int veml6031x00_set_scale(struct iio_dev *iio, int val, int val2)
   420	{
   421		struct veml6031x00_data *data = iio_priv(iio);
 > 422		int new_scale, gain_idx;
   423	
   424		if (val == 0 && val2 == 125000) {
   425			new_scale = FIELD_PREP(VEML6031X00_CONF1_GAIN, 0x03) |
   426				VEML6031X00_CONF1_PD_D4;
   427			gain_idx = 0;
   428		} else if (val == 0 && val2 == 165000) {
   429			new_scale = FIELD_PREP(VEML6031X00_CONF1_GAIN, 0x02) |
   430				VEML6031X00_CONF1_PD_D4;
   431			gain_idx = 1;
   432		} else if (val == 0 && val2 == 250000) {
   433			new_scale = FIELD_PREP(VEML6031X00_CONF1_GAIN, 0x00) |
   434				VEML6031X00_CONF1_PD_D4;
   435			gain_idx = 2;
   436		} else if (val == 0 && val2 == 500000) {
   437			new_scale = FIELD_PREP(VEML6031X00_CONF1_GAIN, 0x03);
   438			gain_idx = 3;
   439		} else if (val == 0 && val2 == 660000) {
   440			new_scale = FIELD_PREP(VEML6031X00_CONF1_GAIN, 0x02);
   441			gain_idx = 4;
   442		} else if (val == 1 && val2 == 0) {
   443			new_scale = FIELD_PREP(VEML6031X00_CONF1_GAIN, 0x00);
   444			gain_idx = 5;
   445		} else if (val == 2 && val2 == 0) {
   446			new_scale = FIELD_PREP(VEML6031X00_CONF1_GAIN, 0x01);
   447			gain_idx = 6;
   448		} else {
   449			return -EINVAL;
   450		}
   451	
   452		return regmap_update_bits(data->regmap, VEML6031X00_REG_CONF1,
   453					 VEML6031X00_CONF1_GAIN |
   454					 VEML6031X00_CONF1_PD_D4,
   455					 new_scale);
   456	}
   457	

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

  reply	other threads:[~2024-11-28  9:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-26 21:51 [PATCH 0/2] iio: light: add support for veml6031x00 ALS series Javier Carrasco
2024-11-26 21:51 ` [PATCH 1/2] dt-bindings: iio: light: veml6030: add " Javier Carrasco
2024-11-27  9:02   ` Krzysztof Kozlowski
2024-11-26 21:51 ` [PATCH 2/2] iio: light: add support for " Javier Carrasco
2024-11-28  9:55   ` kernel test robot [this message]
2024-11-28 11:06     ` Javier Carrasco
2024-11-30 20:17   ` 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=202411281741.xz7mD4E2-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gupt21@gmail.com \
    --cc=javier.carrasco.cruz@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=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