All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [chrome-os:chromeos-6.12 21/21] drivers/iio/light/cros_ec_light_prox.c:363:9: sparse: sparse: dereference of noderef expression
Date: Fri, 27 Dec 2024 22:51:19 +0800	[thread overview]
Message-ID: <202412272215.vC09Q8KE-lkp@intel.com> (raw)

tree:   https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-6.12
head:   ca8e7ba4cbf9fe4c8fe507bf6d5f91c4f6d0b173
commit: 8265d12d01cf5f4e63f8b499cd268615f74cc2b4 [21/21] CHROMIUM: iio: cros_ec_light: Add support for RGB sensor
config: x86_64-randconfig-r113-20241227 (https://download.01.org/0day-ci/archive/20241227/202412272215.vC09Q8KE-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/20241227/202412272215.vC09Q8KE-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/202412272215.vC09Q8KE-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/iio/light/cros_ec_light_prox.c:363:9: sparse: sparse: dereference of noderef expression
>> drivers/iio/light/cros_ec_light_prox.c:363:9: sparse: sparse: dereference of noderef expression
>> drivers/iio/light/cros_ec_light_prox.c:363:9: sparse: sparse: dereference of noderef expression

vim +363 drivers/iio/light/cros_ec_light_prox.c

   342	
   343	static int cros_ec_light_push_data_rgb(
   344			struct iio_dev *indio_dev,
   345			s16 *data,
   346			s64 timestamp)
   347	{
   348		struct cros_ec_sensors_core_state *st = iio_priv(indio_dev);
   349		s16 *out;
   350		s64 delta;
   351		unsigned int i = 1;
   352	
   353		if (!st || !indio_dev->active_scan_mask)
   354			return 0;
   355	
   356		/*
   357		 * Send all data needed.
   358		 */
   359		out = (s16 *)st->samples;
   360		if (test_bit(0, indio_dev->active_scan_mask))
   361			out++;
   362	
 > 363		for_each_set_bit_from(i,
   364				 indio_dev->active_scan_mask,
   365				 indio_dev->masklength) {
   366			*out = data[i - 1];
   367			out++;
   368		}
   369	
   370		if (iio_device_get_clock(indio_dev) != CLOCK_BOOTTIME)
   371			delta = iio_get_time_ns(indio_dev) - cros_ec_get_time_ns();
   372		else
   373			delta = 0;
   374	
   375		iio_push_to_buffers_with_timestamp(indio_dev, st->samples,
   376						   timestamp + delta);
   377		return 0;
   378	}
   379	

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

             reply	other threads:[~2024-12-27 14:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-27 14:51 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-27 18:01 [chrome-os:chromeos-6.12 21/21] drivers/iio/light/cros_ec_light_prox.c:363:9: sparse: sparse: dereference of noderef expression kernel test robot

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=202412272215.vC09Q8KE-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cros-kernel-buildreports@googlegroups.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.