lkml.org 
[lkml]   [2022]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[pdx86-platform-drivers-x86:for-next 56/92] drivers/platform/surface/surface_aggregator_tabletsw.c:425:9: sparse: sparse: restricted __le32 degrades to integer
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git for-next
head: 5c8b3f11565e64366d53295e8004edaa1fcf1ec9
commit: 9f794056db5bb1e1add83ed553b6aec57298358c [56/92] platform/surface: Add KIP/POS tablet-mode switch driver
config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20220717/202207171459.4Xx3ULcF-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?id=9f794056db5bb1e1add83ed553b6aec57298358c
git remote add pdx86-platform-drivers-x86 https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
git fetch --no-tags pdx86-platform-drivers-x86 for-next
git checkout 9f794056db5bb1e1add83ed553b6aec57298358c
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/misc/lkdtm/ drivers/platform/surface/ drivers/platform/x86/intel/ kernel/trace/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> drivers/platform/surface/surface_aggregator_tabletsw.c:425:9: sparse: sparse: restricted __le32 degrades to integer

vim +425 drivers/platform/surface/surface_aggregator_tabletsw.c

403
404 static int ssam_pos_get_source(struct ssam_tablet_sw *sw, u32 *source_id)
405 {
406 struct ssam_sources_list sources = {};
407 int status;
408
409 status = ssam_pos_get_sources_list(sw, &sources);
410 if (status)
411 return status;
412
413 if (sources.count == 0) {
414 dev_err(&sw->sdev->dev, "no posture sources found\n");
415 return -ENODEV;
416 }
417
418 /*
419 * We currently don't know what to do with more than one posture
420 * source. At the moment, only one source seems to be used/provided.
421 * The WARN_ON() here should hopefully let us know quickly once there
422 * is a device that provides multiple sources, at which point we can
423 * then try to figure out how to handle them.
424 */
> 425 WARN_ON(sources.count > 1);
426
427 *source_id = get_unaligned_le32(&sources.id[0]);
428 return 0;
429 }
430

--
0-DAY CI Kernel Test Service
https://01.org/lkp

\
 
 \ /
  Last update: 2022-07-17 09:06    [W:0.094 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site