All of lore.kernel.org
 help / color / mirror / Atom feed
* [chrome-os:chromeos-6.12 21/21] drivers/iio/light/cros_ec_light_prox.c:363:9: sparse: sparse: dereference of noderef expression
@ 2024-12-27 18:01 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-12-27 18:01 UTC (permalink / raw)
  To: cros-kernel-buildreports; +Cc: oe-kbuild-all

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/20241228/202412280147.SSU1D8LN-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/20241228/202412280147.SSU1D8LN-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/202412280147.SSU1D8LN-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

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [chrome-os:chromeos-6.12 21/21] drivers/iio/light/cros_ec_light_prox.c:363:9: sparse: sparse: dereference of noderef expression
@ 2024-12-27 14:51 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-12-27 14:51 UTC (permalink / raw)
  To: cros-kernel-buildreports; +Cc: oe-kbuild-all

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-27 18:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2024-12-27 14:51 kernel test robot

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.