* arch/um/drivers/vector_user.c:184:27: sparse: sparse: incorrect type in assignment (different base types)
@ 2026-05-14 4:41 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-14 4:41 UTC (permalink / raw)
To: Tiwei Bie; +Cc: oe-kbuild-all, linux-kernel, Johannes Berg
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e1914add2799225a87502051415fc5c32aeb02ae
commit: b555cb66583e99158cfef8e91c025252cefae55b um: vector: Eliminate the dependency on uml_net
date: 1 year ago
config: um-randconfig-r111-20260514 (https://download.01.org/0day-ci/archive/20260514/202605141207.Cy94BJGe-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260514/202605141207.Cy94BJGe-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: b555cb66583e ("um: vector: Eliminate the dependency on uml_net")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605141207.Cy94BJGe-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> arch/um/drivers/vector_user.c:184:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [assigned] [usertype] sll_protocol @@ got unsigned short @@
arch/um/drivers/vector_user.c:184:27: sparse: expected restricted __be16 [assigned] [usertype] sll_protocol
arch/um/drivers/vector_user.c:184:27: sparse: got unsigned short
>> arch/um/drivers/vector_user.c:828:9: sparse: sparse: Using plain integer as NULL pointer
arch/um/drivers/vector_user.c:908:24: sparse: sparse: Using plain integer as NULL pointer
vim +184 arch/um/drivers/vector_user.c
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 163
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 164 static int create_raw_fd(char *iface, int flags, int proto)
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 165 {
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 166 struct ifreq ifr;
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 167 int fd = -1;
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 168 struct sockaddr_ll sock;
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 169 int err = -ENOMEM;
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 170
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 171 fd = socket(AF_PACKET, SOCK_RAW, flags);
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 172 if (fd == -1) {
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 173 err = -errno;
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 174 goto raw_fd_cleanup;
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 175 }
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 176 memset(&ifr, 0, sizeof(ifr));
1e06589843632af Kees Cook 2024-02-02 177 strscpy(ifr.ifr_name, iface);
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 178 if (ioctl(fd, SIOCGIFINDEX, (void *) &ifr) < 0) {
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 179 err = -errno;
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 180 goto raw_fd_cleanup;
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 181 }
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 182
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 183 sock.sll_family = AF_PACKET;
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 @184 sock.sll_protocol = htons(proto);
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 185 sock.sll_ifindex = ifr.ifr_ifindex;
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 186
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 187 if (bind(fd,
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 188 (struct sockaddr *) &sock, sizeof(struct sockaddr_ll)) < 0) {
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 189 err = -errno;
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 190 goto raw_fd_cleanup;
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 191 }
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 192 return fd;
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 193 raw_fd_cleanup:
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 194 printk(UM_KERN_ERR "user_init_raw: init failed, error %d", err);
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 195 if (fd >= 0)
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 196 os_close_file(fd);
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 197 return err;
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 198 }
b3b8ca2a1b63713 Anton Ivanov 2019-08-09 199
:::::: The code at line 184 was first introduced by commit
:::::: b3b8ca2a1b63713f59e8d7ad772b09bcd8dc9048 um: Add legacy tap support and rename existing vector to hybrid
:::::: TO: Anton Ivanov <anton.ivanov@cambridgegreys.com>
:::::: CC: Richard Weinberger <richard@nod.at>
--
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-05-14 4:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14 4:41 arch/um/drivers/vector_user.c:184:27: sparse: sparse: incorrect type in assignment (different base types) 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