* [arm-integrator:virt-to-pfn-v6.3-rc3-redux 6/8] fs/cifs/smbdirect.c:2503:40: sparse: sparse: incorrect type in argument 1 (different base types)
@ 2023-03-24 14:21 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-03-24 14:21 UTC (permalink / raw)
To: Linus Walleij; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git virt-to-pfn-v6.3-rc3-redux
head: b5fe3402030c1ea066167108866fd21881895594
commit: 1df3431f995d6bb7a731770a7393c3011b52a581 [6/8] ARM: mm: Make virt_to_pfn() a static inline
config: arm-randconfig-s033-20230322 (https://download.01.org/0day-ci/archive/20230324/202303242255.WI4MyXWW-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git/commit/?id=1df3431f995d6bb7a731770a7393c3011b52a581
git remote add arm-integrator https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
git fetch --no-tags arm-integrator virt-to-pfn-v6.3-rc3-redux
git checkout 1df3431f995d6bb7a731770a7393c3011b52a581
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash fs/cifs/ fs/netfs/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303242255.WI4MyXWW-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> fs/cifs/smbdirect.c:2503:40: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const *p @@ got unsigned long [assigned] kaddr @@
fs/cifs/smbdirect.c:2503:40: sparse: expected void const *p
fs/cifs/smbdirect.c:2503:40: sparse: got unsigned long [assigned] kaddr
--
fs/cifs/smb2ops.c: note: in included file:
>> fs/cifs/cifsglob.h:2216:29: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const *p @@ got unsigned long [assigned] addr @@
fs/cifs/cifsglob.h:2216:29: sparse: expected void const *p
fs/cifs/cifsglob.h:2216:29: sparse: got unsigned long [assigned] addr
>> fs/cifs/cifsglob.h:2216:29: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const *p @@ got unsigned long [assigned] addr @@
fs/cifs/cifsglob.h:2216:29: sparse: expected void const *p
fs/cifs/cifsglob.h:2216:29: sparse: got unsigned long [assigned] addr
--
>> fs/netfs/iterator.c:243:40: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const *p @@ got unsigned long [assigned] kaddr @@
fs/netfs/iterator.c:243:40: sparse: expected void const *p
fs/netfs/iterator.c:243:40: sparse: got unsigned long [assigned] kaddr
vim +2503 fs/cifs/smbdirect.c
e5fbdde4301711 David Howells 2022-10-27 2465
e5fbdde4301711 David Howells 2022-10-27 2466 /*
e5fbdde4301711 David Howells 2022-10-27 2467 * Extract fragments from a KVEC-class iterator and add them to an RDMA list.
e5fbdde4301711 David Howells 2022-10-27 2468 * This can deal with vmalloc'd buffers as well as kmalloc'd or static buffers.
e5fbdde4301711 David Howells 2022-10-27 2469 * The pages are not pinned.
e5fbdde4301711 David Howells 2022-10-27 2470 */
e5fbdde4301711 David Howells 2022-10-27 2471 static ssize_t smb_extract_kvec_to_rdma(struct iov_iter *iter,
e5fbdde4301711 David Howells 2022-10-27 2472 struct smb_extract_to_rdma *rdma,
e5fbdde4301711 David Howells 2022-10-27 2473 ssize_t maxsize)
e5fbdde4301711 David Howells 2022-10-27 2474 {
e5fbdde4301711 David Howells 2022-10-27 2475 const struct kvec *kv = iter->kvec;
e5fbdde4301711 David Howells 2022-10-27 2476 unsigned long start = iter->iov_offset;
e5fbdde4301711 David Howells 2022-10-27 2477 unsigned int i;
e5fbdde4301711 David Howells 2022-10-27 2478 ssize_t ret = 0;
e5fbdde4301711 David Howells 2022-10-27 2479
e5fbdde4301711 David Howells 2022-10-27 2480 for (i = 0; i < iter->nr_segs; i++) {
e5fbdde4301711 David Howells 2022-10-27 2481 struct page *page;
e5fbdde4301711 David Howells 2022-10-27 2482 unsigned long kaddr;
e5fbdde4301711 David Howells 2022-10-27 2483 size_t off, len, seg;
e5fbdde4301711 David Howells 2022-10-27 2484
e5fbdde4301711 David Howells 2022-10-27 2485 len = kv[i].iov_len;
e5fbdde4301711 David Howells 2022-10-27 2486 if (start >= len) {
e5fbdde4301711 David Howells 2022-10-27 2487 start -= len;
e5fbdde4301711 David Howells 2022-10-27 2488 continue;
e5fbdde4301711 David Howells 2022-10-27 2489 }
e5fbdde4301711 David Howells 2022-10-27 2490
e5fbdde4301711 David Howells 2022-10-27 2491 kaddr = (unsigned long)kv[i].iov_base + start;
e5fbdde4301711 David Howells 2022-10-27 2492 off = kaddr & ~PAGE_MASK;
e5fbdde4301711 David Howells 2022-10-27 2493 len = min_t(size_t, maxsize, len - start);
e5fbdde4301711 David Howells 2022-10-27 2494 kaddr &= PAGE_MASK;
e5fbdde4301711 David Howells 2022-10-27 2495
e5fbdde4301711 David Howells 2022-10-27 2496 maxsize -= len;
e5fbdde4301711 David Howells 2022-10-27 2497 do {
e5fbdde4301711 David Howells 2022-10-27 2498 seg = min_t(size_t, len, PAGE_SIZE - off);
e5fbdde4301711 David Howells 2022-10-27 2499
e5fbdde4301711 David Howells 2022-10-27 2500 if (is_vmalloc_or_module_addr((void *)kaddr))
e5fbdde4301711 David Howells 2022-10-27 2501 page = vmalloc_to_page((void *)kaddr);
e5fbdde4301711 David Howells 2022-10-27 2502 else
e5fbdde4301711 David Howells 2022-10-27 @2503 page = virt_to_page(kaddr);
e5fbdde4301711 David Howells 2022-10-27 2504
e5fbdde4301711 David Howells 2022-10-27 2505 if (!smb_set_sge(rdma, page, off, seg))
e5fbdde4301711 David Howells 2022-10-27 2506 return -EIO;
e5fbdde4301711 David Howells 2022-10-27 2507
e5fbdde4301711 David Howells 2022-10-27 2508 ret += seg;
e5fbdde4301711 David Howells 2022-10-27 2509 len -= seg;
e5fbdde4301711 David Howells 2022-10-27 2510 kaddr += PAGE_SIZE;
e5fbdde4301711 David Howells 2022-10-27 2511 off = 0;
e5fbdde4301711 David Howells 2022-10-27 2512 } while (len > 0 && rdma->nr_sge < rdma->max_sge);
e5fbdde4301711 David Howells 2022-10-27 2513
e5fbdde4301711 David Howells 2022-10-27 2514 if (rdma->nr_sge >= rdma->max_sge || maxsize <= 0)
e5fbdde4301711 David Howells 2022-10-27 2515 break;
e5fbdde4301711 David Howells 2022-10-27 2516 start = 0;
e5fbdde4301711 David Howells 2022-10-27 2517 }
e5fbdde4301711 David Howells 2022-10-27 2518
e5fbdde4301711 David Howells 2022-10-27 2519 return ret;
e5fbdde4301711 David Howells 2022-10-27 2520 }
e5fbdde4301711 David Howells 2022-10-27 2521
:::::: The code at line 2503 was first introduced by commit
:::::: e5fbdde430171175f32094c8059eea0d0e2487ae cifs: Add a function to build an RDMA SGE list from an iterator
:::::: TO: David Howells <dhowells@redhat.com>
:::::: CC: Steve French <stfrench@microsoft.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-24 14:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-24 14:21 [arm-integrator:virt-to-pfn-v6.3-rc3-redux 6/8] fs/cifs/smbdirect.c:2503:40: sparse: sparse: incorrect type in argument 1 (different base types) 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.