* [pali:cifs 10/20] fs/smb/client/reparse.c:422:48: sparse: sparse: incorrect type in assignment (different base types)
@ 2024-11-17 17:54 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-11-17 17:54 UTC (permalink / raw)
To: Pali =?unknown-8bit?B?Um9ow6Fy?=; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/pali/linux.git cifs
head: f36b8c5bb788de2feea99660389db8e290cb36c5
commit: 65b590a114d82083b7dd4df1ef39791906441813 [10/20] cifs: Add support for creating NFS-style symlinks
config: x86_64-randconfig-122-20241117 (https://download.01.org/0day-ci/archive/20241118/202411180158.TiVIzJVS-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241118/202411180158.TiVIzJVS-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/202411180158.TiVIzJVS-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
fs/smb/client/reparse.c:175:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] @@ got int @@
fs/smb/client/reparse.c:175:25: sparse: expected restricted __le16 [usertype]
fs/smb/client/reparse.c:175:25: sparse: got int
fs/smb/client/reparse.c:176:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] @@ got int @@
fs/smb/client/reparse.c:176:35: sparse: expected restricted __le16 [usertype]
fs/smb/client/reparse.c:176:35: sparse: got int
fs/smb/client/reparse.c:177:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] @@ got int @@
fs/smb/client/reparse.c:177:25: sparse: expected restricted __le16 [usertype]
fs/smb/client/reparse.c:177:25: sparse: got int
>> fs/smb/client/reparse.c:422:48: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] @@ got unsigned int @@
fs/smb/client/reparse.c:422:48: sparse: expected restricted __le32 [usertype]
fs/smb/client/reparse.c:422:48: sparse: got unsigned int
fs/smb/client/reparse.c:423:48: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] @@ got unsigned int @@
fs/smb/client/reparse.c:423:48: sparse: expected restricted __le32 [usertype]
fs/smb/client/reparse.c:423:48: sparse: got unsigned int
fs/smb/client/reparse.c:1002:45: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected unsigned short [usertype] *pwcs @@ got restricted __le16 [usertype] *[assigned] symname_utf16 @@
fs/smb/client/reparse.c:1002:45: sparse: expected unsigned short [usertype] *pwcs
fs/smb/client/reparse.c:1002:45: sparse: got restricted __le16 [usertype] *[assigned] symname_utf16
fs/smb/client/reparse.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, ...):
include/linux/page-flags.h:237:46: sparse: sparse: self-comparison always evaluates to false
include/linux/page-flags.h:237:46: sparse: sparse: self-comparison always evaluates to false
vim +422 fs/smb/client/reparse.c
406
407 static int nfs_set_reparse_buf(struct reparse_posix_data *buf,
408 mode_t mode, dev_t dev,
409 __le16 *symname_utf16,
410 int symname_utf16_len,
411 struct kvec *iov)
412 {
413 u64 type;
414 u16 len, dlen;
415
416 len = sizeof(*buf);
417
418 switch ((type = reparse_mode_nfs_type(mode))) {
419 case NFS_SPECFILE_BLK:
420 case NFS_SPECFILE_CHR:
421 dlen = 2 * sizeof(__le32);
> 422 ((__le32 *)buf->DataBuffer)[0] = MAJOR(dev);
423 ((__le32 *)buf->DataBuffer)[1] = MINOR(dev);
424 break;
425 case NFS_SPECFILE_LNK:
426 dlen = symname_utf16_len;
427 memcpy(buf->DataBuffer, symname_utf16, symname_utf16_len);
428 break;
429 case NFS_SPECFILE_FIFO:
430 case NFS_SPECFILE_SOCK:
431 dlen = 0;
432 break;
433 default:
434 return -EOPNOTSUPP;
435 }
436
437 buf->ReparseTag = cpu_to_le32(IO_REPARSE_TAG_NFS);
438 buf->Reserved = 0;
439 buf->InodeType = cpu_to_le64(type);
440 buf->ReparseDataLength = cpu_to_le16(len + dlen -
441 sizeof(struct reparse_data_buffer));
442 iov->iov_base = buf;
443 iov->iov_len = len + dlen;
444 return 0;
445 }
446
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pali:cifs 10/20] fs/smb/client/reparse.c:422:48: sparse: sparse: incorrect type in assignment (different base types)
@ 2024-11-30 21:52 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-11-30 21:52 UTC (permalink / raw)
To: Pali =?unknown-8bit?B?Um9ow6Fy?=; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/pali/linux.git cifs
head: f36b8c5bb788de2feea99660389db8e290cb36c5
commit: 65b590a114d82083b7dd4df1ef39791906441813 [10/20] cifs: Add support for creating NFS-style symlinks
config: x86_64-randconfig-122-20241117 (https://download.01.org/0day-ci/archive/20241201/202412010530.bPsafPIv-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241201/202412010530.bPsafPIv-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/202412010530.bPsafPIv-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
fs/smb/client/reparse.c:175:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] @@ got int @@
fs/smb/client/reparse.c:175:25: sparse: expected restricted __le16 [usertype]
fs/smb/client/reparse.c:175:25: sparse: got int
fs/smb/client/reparse.c:176:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] @@ got int @@
fs/smb/client/reparse.c:176:35: sparse: expected restricted __le16 [usertype]
fs/smb/client/reparse.c:176:35: sparse: got int
fs/smb/client/reparse.c:177:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] @@ got int @@
fs/smb/client/reparse.c:177:25: sparse: expected restricted __le16 [usertype]
fs/smb/client/reparse.c:177:25: sparse: got int
>> fs/smb/client/reparse.c:422:48: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] @@ got unsigned int @@
fs/smb/client/reparse.c:422:48: sparse: expected restricted __le32 [usertype]
fs/smb/client/reparse.c:422:48: sparse: got unsigned int
fs/smb/client/reparse.c:423:48: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] @@ got unsigned int @@
fs/smb/client/reparse.c:423:48: sparse: expected restricted __le32 [usertype]
fs/smb/client/reparse.c:423:48: sparse: got unsigned int
fs/smb/client/reparse.c:1002:45: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected unsigned short [usertype] *pwcs @@ got restricted __le16 [usertype] *[assigned] symname_utf16 @@
fs/smb/client/reparse.c:1002:45: sparse: expected unsigned short [usertype] *pwcs
fs/smb/client/reparse.c:1002:45: sparse: got restricted __le16 [usertype] *[assigned] symname_utf16
fs/smb/client/reparse.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, ...):
include/linux/page-flags.h:237:46: sparse: sparse: self-comparison always evaluates to false
include/linux/page-flags.h:237:46: sparse: sparse: self-comparison always evaluates to false
vim +422 fs/smb/client/reparse.c
406
407 static int nfs_set_reparse_buf(struct reparse_posix_data *buf,
408 mode_t mode, dev_t dev,
409 __le16 *symname_utf16,
410 int symname_utf16_len,
411 struct kvec *iov)
412 {
413 u64 type;
414 u16 len, dlen;
415
416 len = sizeof(*buf);
417
418 switch ((type = reparse_mode_nfs_type(mode))) {
419 case NFS_SPECFILE_BLK:
420 case NFS_SPECFILE_CHR:
421 dlen = 2 * sizeof(__le32);
> 422 ((__le32 *)buf->DataBuffer)[0] = MAJOR(dev);
423 ((__le32 *)buf->DataBuffer)[1] = MINOR(dev);
424 break;
425 case NFS_SPECFILE_LNK:
426 dlen = symname_utf16_len;
427 memcpy(buf->DataBuffer, symname_utf16, symname_utf16_len);
428 break;
429 case NFS_SPECFILE_FIFO:
430 case NFS_SPECFILE_SOCK:
431 dlen = 0;
432 break;
433 default:
434 return -EOPNOTSUPP;
435 }
436
437 buf->ReparseTag = cpu_to_le32(IO_REPARSE_TAG_NFS);
438 buf->Reserved = 0;
439 buf->InodeType = cpu_to_le64(type);
440 buf->ReparseDataLength = cpu_to_le16(len + dlen -
441 sizeof(struct reparse_data_buffer));
442 iov->iov_base = buf;
443 iov->iov_len = len + dlen;
444 return 0;
445 }
446
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-30 21:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-30 21:52 [pali:cifs 10/20] fs/smb/client/reparse.c:422:48: sparse: sparse: incorrect type in assignment (different base types) kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2024-11-17 17:54 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.