From: kernel test robot <lkp@intel.com>
To: "Pali Rohár" <pali@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [pali:cifs 48/48] fs/smb/client/cifssmb.c:2897:27: sparse: sparse: incorrect type in assignment (different base types)
Date: Sat, 28 Dec 2024 10:00:06 +0800 [thread overview]
Message-ID: <202412280944.DH91CjjZ-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/pali/linux.git cifs
head: cc26137de51202e7210b058f6696393f1e006d46
commit: 817f8d87b6285eee3ee97e25a32f2405cd5819a0 [48/48] cifs: Add support for creating reparse points over SMB1
config: x86_64-randconfig-122-20241228 (https://download.01.org/0day-ci/archive/20241228/202412280944.DH91CjjZ-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/20241228/202412280944.DH91CjjZ-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/202412280944.DH91CjjZ-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> fs/smb/client/cifssmb.c:2897:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] ByteCount @@ got restricted __le32 [usertype] @@
fs/smb/client/cifssmb.c:2897:27: sparse: expected restricted __le16 [usertype] ByteCount
fs/smb/client/cifssmb.c:2897:27: sparse: got restricted __le32 [usertype]
vim +2897 fs/smb/client/cifssmb.c
2868
2869 rc = smb_init(SMB_COM_NT_TRANSACT, 23, tcon, (void **)&io_req, NULL);
2870 if (rc)
2871 goto out_close;
2872
2873 inc_rfc1001_len(io_req, sizeof(io_req->Pad));
2874
2875 io_req_len = be32_to_cpu(io_req->hdr.smb_buf_length) + sizeof(io_req->hdr.smb_buf_length);
2876
2877 /* NT IOCTL response contains one-word long output setup buffer with size of output data. */
2878 io_req->MaxSetupCount = 1;
2879 /* NT IOCTL response does not contain output parameters. */
2880 io_req->MaxParameterCount = cpu_to_le32(0);
2881 /* FSCTL_SET_REPARSE_POINT response contains empty output data. */
2882 io_req->MaxDataCount = cpu_to_le32(0);
2883
2884 io_req->TotalParameterCount = cpu_to_le32(0);
2885 io_req->TotalDataCount = cpu_to_le32(reparse_iov->iov_len);
2886 io_req->ParameterCount = io_req->TotalParameterCount;
2887 io_req->ParameterOffset = cpu_to_le32(0);
2888 io_req->DataCount = io_req->TotalDataCount;
2889 io_req->DataOffset = cpu_to_le32(offsetof(typeof(*io_req), Data) -
2890 sizeof(io_req->hdr.smb_buf_length));
2891 io_req->SetupCount = 4;
2892 io_req->SubCommand = cpu_to_le16(NT_TRANSACT_IOCTL);
2893 io_req->FunctionCode = cpu_to_le32(FSCTL_SET_REPARSE_POINT);
2894 io_req->Fid = fid.netfid;
2895 io_req->IsFsctl = 1;
2896 io_req->IsRootFlag = 0;
> 2897 io_req->ByteCount = cpu_to_le32(le32_to_cpu(io_req->DataCount) + sizeof(io_req->Pad));
2898
2899 inc_rfc1001_len(io_req, reparse_iov->iov_len);
2900
2901 in_iov[0].iov_base = (char *)io_req;
2902 in_iov[0].iov_len = io_req_len;
2903 in_iov[1] = *reparse_iov;
2904 rc = SendReceive2(xid, tcon->ses, in_iov, ARRAY_SIZE(in_iov), &buf_type,
2905 CIFS_NO_RSP_BUF, &out_iov);
2906
2907 cifs_buf_release(io_req);
2908
2909 if (!rc)
2910 rc = cifs_get_inode_info(&new, full_path, data, sb, xid, NULL);
2911
2912 out_close:
2913 CIFSSMBClose(xid, tcon, fid.netfid);
2914
2915 /*
2916 * If CREATE was successful but FSCTL_SET_REPARSE_POINT failed then
2917 * remove the intermediate object created by CREATE. Otherwise
2918 * empty object stay on the server when reparse call failed.
2919 */
2920 if (rc)
2921 CIFSSMBDelFile(xid, tcon, full_path, cifs_sb, NULL);
2922
2923 return rc ? ERR_PTR(rc) : new;
2924 }
2925
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-12-28 2:00 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=202412280944.DH91CjjZ-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.