From: kernel test robot <lkp@intel.com>
To: Charlie Jenkins <charlie@rivosinc.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Palmer Dabbelt <palmer@rivosinc.com>
Subject: [linux-next:master 13664/13959] lib/checksum_kunit.c:616:17: sparse: sparse: incorrect type in argument 5 (different base types)
Date: Sat, 20 Jan 2024 00:32:23 +0800 [thread overview]
Message-ID: <202401200016.e774FjBx-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: ad5c60d66016e544c51ed98635a74073f761f45d
commit: 6f4c45cbcb00d649475a3099235e5b4fce569b4b [13664/13959] kunit: Add tests for csum_ipv6_magic and ip_fast_csum
config: x86_64-randconfig-121-20240119 (https://download.01.org/0day-ci/archive/20240120/202401200016.e774FjBx-lkp@intel.com/config)
compiler: ClangBuiltLinux clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240120/202401200016.e774FjBx-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/202401200016.e774FjBx-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
lib/checksum_kunit.c:442:33: sparse: got int
lib/checksum_kunit.c:442:41: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:442:41: sparse: expected restricted __sum16
lib/checksum_kunit.c:442:41: sparse: got int
lib/checksum_kunit.c:442:49: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:442:49: sparse: expected restricted __sum16
lib/checksum_kunit.c:442:49: sparse: got int
lib/checksum_kunit.c:442:57: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:442:57: sparse: expected restricted __sum16
lib/checksum_kunit.c:442:57: sparse: got int
lib/checksum_kunit.c:442:65: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:442:65: sparse: expected restricted __sum16
lib/checksum_kunit.c:442:65: sparse: got int
lib/checksum_kunit.c:442:73: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:442:73: sparse: expected restricted __sum16
lib/checksum_kunit.c:442:73: sparse: got int
lib/checksum_kunit.c:443:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:443:9: sparse: expected restricted __sum16
lib/checksum_kunit.c:443:9: sparse: got int
lib/checksum_kunit.c:443:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:443:17: sparse: expected restricted __sum16
lib/checksum_kunit.c:443:17: sparse: got int
lib/checksum_kunit.c:443:25: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:443:25: sparse: expected restricted __sum16
lib/checksum_kunit.c:443:25: sparse: got int
lib/checksum_kunit.c:443:33: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:443:33: sparse: expected restricted __sum16
lib/checksum_kunit.c:443:33: sparse: got int
lib/checksum_kunit.c:443:41: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:443:41: sparse: expected restricted __sum16
lib/checksum_kunit.c:443:41: sparse: got int
lib/checksum_kunit.c:443:49: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:443:49: sparse: expected restricted __sum16
lib/checksum_kunit.c:443:49: sparse: got int
lib/checksum_kunit.c:443:57: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:443:57: sparse: expected restricted __sum16
lib/checksum_kunit.c:443:57: sparse: got int
lib/checksum_kunit.c:443:65: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:443:65: sparse: expected restricted __sum16
lib/checksum_kunit.c:443:65: sparse: got int
lib/checksum_kunit.c:443:73: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:443:73: sparse: expected restricted __sum16
lib/checksum_kunit.c:443:73: sparse: got int
lib/checksum_kunit.c:444:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:444:9: sparse: expected restricted __sum16
lib/checksum_kunit.c:444:9: sparse: got int
lib/checksum_kunit.c:444:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:444:17: sparse: expected restricted __sum16
lib/checksum_kunit.c:444:17: sparse: got int
lib/checksum_kunit.c:444:25: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:444:25: sparse: expected restricted __sum16
lib/checksum_kunit.c:444:25: sparse: got int
lib/checksum_kunit.c:444:33: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:444:33: sparse: expected restricted __sum16
lib/checksum_kunit.c:444:33: sparse: got int
lib/checksum_kunit.c:444:41: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:444:41: sparse: expected restricted __sum16
lib/checksum_kunit.c:444:41: sparse: got int
lib/checksum_kunit.c:444:49: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:444:49: sparse: expected restricted __sum16
lib/checksum_kunit.c:444:49: sparse: got int
lib/checksum_kunit.c:444:57: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:444:57: sparse: expected restricted __sum16
lib/checksum_kunit.c:444:57: sparse: got int
lib/checksum_kunit.c:444:65: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:444:65: sparse: expected restricted __sum16
lib/checksum_kunit.c:444:65: sparse: got int
lib/checksum_kunit.c:444:73: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:444:73: sparse: expected restricted __sum16
lib/checksum_kunit.c:444:73: sparse: got int
lib/checksum_kunit.c:445:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:445:9: sparse: expected restricted __sum16
lib/checksum_kunit.c:445:9: sparse: got int
lib/checksum_kunit.c:445:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:445:17: sparse: expected restricted __sum16
lib/checksum_kunit.c:445:17: sparse: got int
lib/checksum_kunit.c:445:25: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:445:25: sparse: expected restricted __sum16
lib/checksum_kunit.c:445:25: sparse: got int
lib/checksum_kunit.c:445:33: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:445:33: sparse: expected restricted __sum16
lib/checksum_kunit.c:445:33: sparse: got int
lib/checksum_kunit.c:445:41: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:445:41: sparse: expected restricted __sum16
lib/checksum_kunit.c:445:41: sparse: got int
lib/checksum_kunit.c:445:49: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:445:49: sparse: expected restricted __sum16
lib/checksum_kunit.c:445:49: sparse: got int
lib/checksum_kunit.c:445:57: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:445:57: sparse: expected restricted __sum16
lib/checksum_kunit.c:445:57: sparse: got int
lib/checksum_kunit.c:445:65: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:445:65: sparse: expected restricted __sum16
lib/checksum_kunit.c:445:65: sparse: got int
lib/checksum_kunit.c:445:73: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:445:73: sparse: expected restricted __sum16
lib/checksum_kunit.c:445:73: sparse: got int
lib/checksum_kunit.c:446:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __sum16 @@ got int @@
lib/checksum_kunit.c:446:9: sparse: expected restricted __sum16
lib/checksum_kunit.c:446:9: sparse: got int
>> lib/checksum_kunit.c:616:17: sparse: sparse: incorrect type in argument 5 (different base types) @@ expected restricted __wsum [usertype] csum @@ got unsigned int [assigned] csum @@
lib/checksum_kunit.c:616:17: sparse: expected restricted __wsum [usertype] csum
lib/checksum_kunit.c:616:17: sparse: got unsigned int [assigned] csum
>> lib/checksum_kunit.c:616:17: sparse: sparse: incorrect type in argument 5 (different base types) @@ expected restricted __wsum [usertype] csum @@ got unsigned int [assigned] csum @@
lib/checksum_kunit.c:616:17: sparse: expected restricted __wsum [usertype] csum
lib/checksum_kunit.c:616:17: sparse: got unsigned int [assigned] csum
vim +616 lib/checksum_kunit.c
593
594 static void test_csum_ipv6_magic(struct kunit *test)
595 {
596 const struct in6_addr *saddr;
597 const struct in6_addr *daddr;
598 unsigned int len;
599 unsigned char proto;
600 unsigned int csum;
601
602 const int daddr_offset = sizeof(struct in6_addr);
603 const int len_offset = sizeof(struct in6_addr) + sizeof(struct in6_addr);
604 const int proto_offset = sizeof(struct in6_addr) + sizeof(struct in6_addr) +
605 sizeof(int);
606 const int csum_offset = sizeof(struct in6_addr) + sizeof(struct in6_addr) +
607 sizeof(int) + sizeof(char);
608
609 for (int i = 0; i < NUM_IPv6_TESTS; i++) {
610 saddr = (const struct in6_addr *)(random_buf + i);
611 daddr = (const struct in6_addr *)(random_buf + i +
612 daddr_offset);
613 len = *(unsigned int *)(random_buf + i + len_offset);
614 proto = *(random_buf + i + proto_offset);
615 csum = *(unsigned int *)(random_buf + i + csum_offset);
> 616 CHECK_EQ(expected_csum_ipv6_magic[i],
617 csum_ipv6_magic(saddr, daddr, len, proto, csum));
618 }
619 }
620
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-01-19 16:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-19 16:32 kernel test robot [this message]
2024-01-19 17:04 kernel test robot
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=202401200016.e774FjBx-lkp@intel.com \
--to=lkp@intel.com \
--cc=charlie@rivosinc.com \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=palmer@rivosinc.com \
/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