From: kernel test robot <lkp@intel.com>
To: Pali =?unknown-8bit?B?Um9ow6Fy?= <pali@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [pali:cifs 10/20] fs/smb/client/reparse.c:422:48: sparse: sparse: incorrect type in assignment (different base types)
Date: Sun, 1 Dec 2024 05:52:19 +0800 [thread overview]
Message-ID: <202412010530.bPsafPIv-lkp@intel.com> (raw)
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
next reply other threads:[~2024-11-30 21:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-30 21:52 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-17 17:54 [pali:cifs 10/20] fs/smb/client/reparse.c:422:48: sparse: sparse: incorrect type in assignment (different base types) 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=202412010530.bPsafPIv-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pali@kernel.org \
/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 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.