Skip to contentSkip to conversation

arch/nios2/include/asm/checksum.h:30:24: sparse: sparse: restricted __wsum degrades to integer

DISCUSSION kernel test robot 1 participant 1 message Sep 22

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f0100363d8c374bd8e9ea7c9ba02744f0b802ca4
commit: 203247c5cb972af5d46bdb7d41ef40078048810b blk-integrity: support arbitrary buffer alignment
date:   6 months ago
config: nios2-randconfig-r1305-20260922 (https://download.01.org/0day-ci/archive/20260922/[email protected]/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260922/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

sparse warnings: (new ones prefixed by >>)
block/t10-pi.c: note: in included file (through include/net/checksum.h):

>> arch/nios2/include/asm/checksum.h:30:24: sparse: sparse: restricted __wsum degrades to integer

block/t10-pi.c: note: in included file (through include/uapi/linux/swab.h, include/linux/swab.h, include/uapi/linux/byteorder/little_endian.h, ...):
arch/nios2/include/asm/swab.h:31:24: sparse: sparse: too many arguments for function __builtin_custom_ini arch/nios2/include/asm/swab.h:31:24: sparse: sparse: too many arguments for function __builtin_custom_ini arch/nios2/include/asm/swab.h:25:24: sparse: sparse: too many arguments for function __builtin_custom_ini arch/nios2/include/asm/swab.h:31:24: sparse: sparse: too many arguments for function __builtin_custom_ini arch/nios2/include/asm/swab.h:25:24: sparse: sparse: too many arguments for function __builtin_custom_ini arch/nios2/include/asm/swab.h:25:24: sparse: sparse: too many arguments for function __builtin_custom_ini arch/nios2/include/asm/swab.h:31:24: sparse: sparse: too many arguments for function __builtin_custom_ini arch/nios2/include/asm/swab.h:31:24: sparse: sparse: too many arguments for function __builtin_custom_ini arch/nios2/include/asm/swab.h:31:24: sparse: sparse: too many arguments for function __builtin_custom_ini arch/nios2/include/asm/swab.h:25:24: sparse: sparse: too many arguments for function __builtin_custom_ini arch/nios2/include/asm/swab.h:31:24: sparse: sparse: too many arguments for function __builtin_custom_ini arch/nios2/include/asm/swab.h:31:24: sparse: sparse: too many arguments for function __builtin_custom_ini arch/nios2/include/asm/swab.h:31:24: sparse: sparse: too many arguments for function __builtin_custom_ini arch/nios2/include/asm/swab.h:31:24: sparse: sparse: too many arguments for function __builtin_custom_ini

vim +30 arch/nios2/include/asm/checksum.h

eea9507a69d637 Ley Foon Tan 2014-11-06  17  
eea9507a69d637 Ley Foon Tan 2014-11-06  18  /*
eea9507a69d637 Ley Foon Tan 2014-11-06  19   * Fold a partial checksum
eea9507a69d637 Ley Foon Tan 2014-11-06  20   */
eea9507a69d637 Ley Foon Tan 2014-11-06  21  static inline __sum16 csum_fold(__wsum sum)
eea9507a69d637 Ley Foon Tan 2014-11-06  22  {
eea9507a69d637 Ley Foon Tan 2014-11-06  23  	__asm__ __volatile__(
eea9507a69d637 Ley Foon Tan 2014-11-06  24  		"add	%0, %1, %0\n"
eea9507a69d637 Ley Foon Tan 2014-11-06  25  		"cmpltu	r8, %0, %1\n"
eea9507a69d637 Ley Foon Tan 2014-11-06  26  		"srli	%0, %0, 16\n"
eea9507a69d637 Ley Foon Tan 2014-11-06  27  		"add	%0, %0, r8\n"
eea9507a69d637 Ley Foon Tan 2014-11-06  28  		"nor	%0, %0, %0\n"
eea9507a69d637 Ley Foon Tan 2014-11-06  29  		: "=r" (sum)
eea9507a69d637 Ley Foon Tan 2014-11-06 @30  		: "r" (sum << 16), "0" (sum)
eea9507a69d637 Ley Foon Tan 2014-11-06  31  		: "r8");
eea9507a69d637 Ley Foon Tan 2014-11-06  32  	return (__force __sum16) sum;
eea9507a69d637 Ley Foon Tan 2014-11-06  33  }

eea9507a69d637 Ley Foon Tan 2014-11-06 34

:::::: The code at line 30 was first introduced by commit :::::: eea9507a69d637d52705de8703b168bf6bfe5643 nios2: Library functions

:::::: TO: Ley Foon Tan <[email protected]>
:::::: CC: Ley Foon Tan <[email protected]>

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