From: kernel test robot <lkp@intel.com>
To: Keith Busch <kbusch@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Jens Axboe <axboe@kernel.dk>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@lst.de>
Subject: arch/arc/include/asm/checksum.h:27:26: sparse: warning: restricted __wsum degrades to integer
Date: Tue, 01 Dec 2026 02:32:53 +0100 [thread overview]
Message-ID: <20261201022523.l8wOXSwY-lkp@intel.com> (raw)
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
reply other threads:[~2026-12-01 1:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261201022523.l8wOXSwY-lkp@intel.com \
--to=lkp@intel.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.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 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®