mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* arch/arc/include/asm/checksum.h:27:26: sparse: warning: restricted __wsum degrades to integer
@ 2026-12-01  1:32 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-12-01  1:32 UTC (permalink / raw)
  To: Keith Busch
  Cc: oe-kbuild-all, linux-kernel, Jens Axboe, Martin K. Petersen,
	Christoph Hellwig

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   19cc08c1a6a650f8e54c0461ff198be6448f425d
commit: 203247c5cb972af5d46bdb7d41ef40078048810b blk-integrity: support arbitrary buffer alignment
date:   9 months ago
config: arc-randconfig-r2302-20261130 (https://download.01.org/0day-ci/archive/20261201/20261201022523.l8wOXSwY-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 13.5.0
sparse: v0.6.5-rc1-94-g0d159c10
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261201/20261201022523.l8wOXSwY-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
| Fixes: 203247c5cb97 ("blk-integrity: support arbitrary buffer alignment")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261201022523.l8wOXSwY-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   block/t10-pi.c: note: in included file (through include/net/checksum.h):
>> arch/arc/include/asm/checksum.h:27:26: sparse: warning: restricted __wsum degrades to integer
   arch/arc/include/asm/checksum.h:27:36: sparse: warning: restricted __wsum degrades to integer
>> arch/arc/include/asm/checksum.h:29:11: sparse: warning: bad assignment (-=) to restricted __wsum
   arch/arc/include/asm/checksum.h:30:16: sparse: warning: restricted __wsum degrades to integer
>> arch/arc/include/asm/checksum.h:30:18: sparse: warning: incorrect type in return expression (different base types)
   arch/arc/include/asm/checksum.h:30:18: sparse:    expected restricted __sum16
   arch/arc/include/asm/checksum.h:30:18: sparse:    got unsigned int

vim +27 arch/arc/include/asm/checksum.h

ca15c8ecd588dd Vineet Gupta 2013-01-18  18  
ca15c8ecd588dd Vineet Gupta 2013-01-18  19  /*
ca15c8ecd588dd Vineet Gupta 2013-01-18  20   *	Fold a partial checksum
ca15c8ecd588dd Vineet Gupta 2013-01-18  21   *
ca15c8ecd588dd Vineet Gupta 2013-01-18  22   *  The 2 swords comprising the 32bit sum are added, any carry to 16th bit
ca15c8ecd588dd Vineet Gupta 2013-01-18  23   *  added back and final sword result inverted.
ca15c8ecd588dd Vineet Gupta 2013-01-18  24   */
ca15c8ecd588dd Vineet Gupta 2013-01-18  25  static inline __sum16 csum_fold(__wsum s)
ca15c8ecd588dd Vineet Gupta 2013-01-18  26  {
d4067395519b40 Jinchao Wang 2021-06-26 @27  	unsigned int r = s << 16 | s >> 16;	/* ror */
ca15c8ecd588dd Vineet Gupta 2013-01-18  28  	s = ~s;
ca15c8ecd588dd Vineet Gupta 2013-01-18 @29  	s -= r;
ca15c8ecd588dd Vineet Gupta 2013-01-18 @30  	return s >> 16;
ca15c8ecd588dd Vineet Gupta 2013-01-18  31  }
ca15c8ecd588dd Vineet Gupta 2013-01-18  32  

:::::: The code at line 27 was first introduced by commit
:::::: d4067395519b40d4ee9b7c26347233e4ae59f900 arc: Prefer unsigned int to bare use of unsigned

:::::: TO: Jinchao Wang <wjc@cdjrlc.com>
:::::: CC: Vineet Gupta <vgupta@synopsys.com>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-01  1:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-01  1:32 arch/arc/include/asm/checksum.h:27:26: sparse: warning: restricted __wsum degrades to integer kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®