From: kernel test robot <[email protected]>
To: David Howells <[email protected]>
Cc: [email protected],
GNU/Weeb Mailing List <[email protected]>,
[email protected]
Subject: [ammarfaizi2-block:dhowells/linux-fs/netfs-linked-list 2/61] lib/iov_iter.c:1803:9: sparse: sparse: incorrect type in argument 2 (different address spaces)
Date: Mon, 4 Jul 2022 19:11:57 +0800 [thread overview]
Message-ID: <[email protected]> (raw)
tree: https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/netfs-linked-list
head: ce4670495468b797b0c5927fcb661bc0da48b9ab
commit: 0ac76aa3371bb25ad7921628f97c51a225ded090 [2/61] iov_iter: Add a general purpose iteration function
config: arc-randconfig-s032-20220703 (https://download.01.org/0day-ci/archive/20220704/[email protected]/config)
compiler: arceb-elf-gcc (GCC) 11.3.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://github.com/ammarfaizi2/linux-block/commit/0ac76aa3371bb25ad7921628f97c51a225ded090
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/netfs-linked-list
git checkout 0ac76aa3371bb25ad7921628f97c51a225ded090
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arc SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>
sparse warnings: (new ones prefixed by >>)
>> lib/iov_iter.c:1803:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *p @@ got void [noderef] __user *[assigned] base @@
lib/iov_iter.c:1803:9: sparse: expected void const *p
lib/iov_iter.c:1803:9: sparse: got void [noderef] __user *[assigned] base
lib/iov_iter.c: note: in included file (through include/linux/uaccess.h, include/linux/sched/task.h, include/linux/sched/signal.h, ...):
arch/arc/include/asm/uaccess.h:590:33: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char *d_char @@ got void [noderef] __user *to @@
arch/arc/include/asm/uaccess.h:590:33: sparse: expected unsigned char *d_char
arch/arc/include/asm/uaccess.h:590:33: sparse: got void [noderef] __user *to
lib/iov_iter.c: note: in included file:
include/net/checksum.h:31:39: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __wsum [usertype] sum @@ got unsigned int @@
include/net/checksum.h:31:39: sparse: expected restricted __wsum [usertype] sum
include/net/checksum.h:31:39: sparse: got unsigned int
include/net/checksum.h:39:45: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __wsum [usertype] sum @@ got unsigned int @@
include/net/checksum.h:39:45: sparse: expected restricted __wsum [usertype] sum
include/net/checksum.h:39:45: sparse: got unsigned int
vim +1803 lib/iov_iter.c
1779
1780 /**
1781 * iov_iter_scan - Scan a source iter
1782 * @i: The iterator to scan
1783 * @bytes: The amount of buffer/data to scan
1784 * @scanner: The function to call for each bit
1785 * @priv: Private data to pass to the scanner function
1786 *
1787 * Scan an iterator, passing each segment to the scanner function. If the
1788 * scanner returns an error at any time, scanning stops and the error is
1789 * returned, otherwise the sum of the scanner results is returned.
1790 */
1791 ssize_t iov_iter_scan(struct iov_iter *i, size_t bytes,
1792 ssize_t (*scanner)(struct iov_iter *i, const void *p,
1793 size_t len, size_t off, void *priv),
1794 void *priv)
1795 {
1796 ssize_t ret = 0, scanned = 0;
1797
1798 if (!bytes)
1799 return 0;
1800 if (iter_is_iovec(i))
1801 might_fault();
1802
> 1803 iterate_and_advance(
1804 i, bytes, base, len, off, ({
1805 ret = scanner(i, base, len, off, priv);
1806 if (ret < 0)
1807 break;
1808 scanned += ret;
1809 }), ({
1810 ret = scanner(i, base, len, off, priv);
1811 if (ret < 0)
1812 break;
1813 scanned += ret;
1814 })
1815 );
1816 return ret < 0 ? ret : scanned;
1817 }
1818 EXPORT_SYMBOL(iov_iter_scan);
1819
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-07-04 11:12 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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox