From: kernel test robot <lkp@intel.com>
To: Jason Wang <jasowang@redhat.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: drivers/vhost/vhost.c:937:16: sparse: sparse: restricted __virtio16 degrades to integer
Date: Sun, 21 Jun 2020 23:15:35 +0800 [thread overview]
Message-ID: <202006212331.gjsJ4DoX%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 13284 bytes --]
Hi Jason,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 64677779e8962c20b580b471790fe42367750599
commit: 20c384f1ea1a0bc7320bc445c72dd02d2970d594 vhost: refine vhost and vringh kconfig
date: 3 months ago
config: riscv-randconfig-s031-20200621 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc2-13-gc59158c8-dirty
git checkout 20c384f1ea1a0bc7320bc445c72dd02d2970d594
# save the attached .config to linux build tree
make W=1 C=1 ARCH=riscv CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/vhost/vhost.c:753:17: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void [noderef] <asn:1> * @@ got void * @@
drivers/vhost/vhost.c:753:17: sparse: expected void [noderef] <asn:1> *
drivers/vhost/vhost.c:753:17: sparse: got void *
drivers/vhost/vhost.c:753:17: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void [noderef] <asn:1> * @@ got void * @@
drivers/vhost/vhost.c:753:17: sparse: expected void [noderef] <asn:1> *
drivers/vhost/vhost.c:753:17: sparse: got void *
drivers/vhost/vhost.c:753:17: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void [noderef] <asn:1> * @@ got void * @@
drivers/vhost/vhost.c:753:17: sparse: expected void [noderef] <asn:1> *
drivers/vhost/vhost.c:753:17: sparse: got void *
>> drivers/vhost/vhost.c:937:16: sparse: sparse: restricted __virtio16 degrades to integer
>> drivers/vhost/vhost.c:937:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:937:16: sparse: sparse: cast from restricted __virtio16
drivers/vhost/vhost.c:937:16: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *addr @@ got restricted __virtio16 [noderef] <asn:1> * @@
drivers/vhost/vhost.c:937:16: sparse: expected void *addr
drivers/vhost/vhost.c:937:16: sparse: got restricted __virtio16 [noderef] <asn:1> *
>> drivers/vhost/vhost.c:937:16: sparse: sparse: restricted __virtio16 degrades to integer
>> drivers/vhost/vhost.c:937:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:937:16: sparse: sparse: cast from restricted __virtio16
drivers/vhost/vhost.c:900:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] <asn:1> *addr @@ got void *addr @@
drivers/vhost/vhost.c:900:42: sparse: expected void [noderef] <asn:1> *addr
drivers/vhost/vhost.c:900:42: sparse: got void *addr
drivers/vhost/vhost.c:753:17: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void [noderef] <asn:1> * @@ got void * @@
drivers/vhost/vhost.c:753:17: sparse: expected void [noderef] <asn:1> *
drivers/vhost/vhost.c:753:17: sparse: got void *
drivers/vhost/vhost.c:922:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:922:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:922:16: sparse: sparse: cast from restricted __virtio16
drivers/vhost/vhost.c:922:16: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *addr @@ got restricted __virtio16 [noderef] [usertype] <asn:1> * @@
drivers/vhost/vhost.c:922:16: sparse: expected void *addr
drivers/vhost/vhost.c:922:16: sparse: got restricted __virtio16 [noderef] [usertype] <asn:1> *
drivers/vhost/vhost.c:922:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:922:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:922:16: sparse: sparse: cast from restricted __virtio16
drivers/vhost/vhost.c:900:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] <asn:1> *addr @@ got void *addr @@
drivers/vhost/vhost.c:900:42: sparse: expected void [noderef] <asn:1> *addr
drivers/vhost/vhost.c:900:42: sparse: got void *addr
drivers/vhost/vhost.c:753:17: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void [noderef] <asn:1> * @@ got void * @@
drivers/vhost/vhost.c:753:17: sparse: expected void [noderef] <asn:1> *
drivers/vhost/vhost.c:753:17: sparse: got void *
drivers/vhost/vhost.c:1014:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:1014:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:1014:16: sparse: sparse: cast to restricted __virtio16
drivers/vhost/vhost.c:1014:16: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *addr @@ got restricted __virtio16 [noderef] <asn:1> * @@
drivers/vhost/vhost.c:1014:16: sparse: expected void *addr
drivers/vhost/vhost.c:1014:16: sparse: got restricted __virtio16 [noderef] <asn:1> *
drivers/vhost/vhost.c:1014:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:1014:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:1014:16: sparse: sparse: cast to restricted __virtio16
drivers/vhost/vhost.c:900:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] <asn:1> *addr @@ got void *addr @@
drivers/vhost/vhost.c:900:42: sparse: expected void [noderef] <asn:1> *addr
drivers/vhost/vhost.c:900:42: sparse: got void *addr
drivers/vhost/vhost.c:753:17: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void [noderef] <asn:1> * @@ got void * @@
drivers/vhost/vhost.c:753:17: sparse: expected void [noderef] <asn:1> *
drivers/vhost/vhost.c:753:17: sparse: got void *
drivers/vhost/vhost.c:989:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:989:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:989:16: sparse: sparse: cast to restricted __virtio16
drivers/vhost/vhost.c:989:16: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *addr @@ got restricted __virtio16 [noderef] <asn:1> * @@
drivers/vhost/vhost.c:989:16: sparse: expected void *addr
drivers/vhost/vhost.c:989:16: sparse: got restricted __virtio16 [noderef] <asn:1> *
drivers/vhost/vhost.c:989:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:989:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:989:16: sparse: sparse: cast to restricted __virtio16
drivers/vhost/vhost.c:900:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] <asn:1> *addr @@ got void *addr @@
drivers/vhost/vhost.c:900:42: sparse: expected void [noderef] <asn:1> *addr
drivers/vhost/vhost.c:900:42: sparse: got void *addr
drivers/vhost/vhost.c:753:17: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void [noderef] <asn:1> * @@ got void * @@
drivers/vhost/vhost.c:753:17: sparse: expected void [noderef] <asn:1> *
drivers/vhost/vhost.c:753:17: sparse: got void *
drivers/vhost/vhost.c:995:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:995:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:995:16: sparse: sparse: cast to restricted __virtio16
drivers/vhost/vhost.c:995:16: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *addr @@ got restricted __virtio16 [noderef] <asn:1> * @@
drivers/vhost/vhost.c:995:16: sparse: expected void *addr
drivers/vhost/vhost.c:995:16: sparse: got restricted __virtio16 [noderef] <asn:1> *
drivers/vhost/vhost.c:995:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:995:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:995:16: sparse: sparse: cast to restricted __virtio16
drivers/vhost/vhost.c:900:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] <asn:1> *addr @@ got void *addr @@
drivers/vhost/vhost.c:900:42: sparse: expected void [noderef] <asn:1> *addr
drivers/vhost/vhost.c:900:42: sparse: got void *addr
drivers/vhost/vhost.c:753:17: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void [noderef] <asn:1> * @@ got void * @@
drivers/vhost/vhost.c:753:17: sparse: expected void [noderef] <asn:1> *
drivers/vhost/vhost.c:753:17: sparse: got void *
drivers/vhost/vhost.c:944:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:944:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:944:16: sparse: sparse: cast from restricted __virtio16
drivers/vhost/vhost.c:944:16: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *addr @@ got restricted __virtio16 [noderef] <asn:1> * @@
drivers/vhost/vhost.c:944:16: sparse: expected void *addr
drivers/vhost/vhost.c:944:16: sparse: got restricted __virtio16 [noderef] <asn:1> *
drivers/vhost/vhost.c:944:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:944:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:944:16: sparse: sparse: cast from restricted __virtio16
drivers/vhost/vhost.c:900:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] <asn:1> *addr @@ got void *addr @@
drivers/vhost/vhost.c:900:42: sparse: expected void [noderef] <asn:1> *addr
drivers/vhost/vhost.c:900:42: sparse: got void *addr
drivers/vhost/vhost.c:753:17: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void [noderef] <asn:1> * @@ got void * @@
drivers/vhost/vhost.c:753:17: sparse: expected void [noderef] <asn:1> *
drivers/vhost/vhost.c:753:17: sparse: got void *
drivers/vhost/vhost.c:1002:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:1002:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:1002:16: sparse: sparse: cast to restricted __virtio16
drivers/vhost/vhost.c:1002:16: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *addr @@ got restricted __virtio16 [noderef] <asn:1> * @@
drivers/vhost/vhost.c:1002:16: sparse: expected void *addr
drivers/vhost/vhost.c:1002:16: sparse: got restricted __virtio16 [noderef] <asn:1> *
drivers/vhost/vhost.c:1002:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:1002:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:1002:16: sparse: sparse: cast to restricted __virtio16
drivers/vhost/vhost.c:900:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] <asn:1> *addr @@ got void *addr @@
drivers/vhost/vhost.c:900:42: sparse: expected void [noderef] <asn:1> *addr
drivers/vhost/vhost.c:900:42: sparse: got void *addr
drivers/vhost/vhost.c:753:17: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void [noderef] <asn:1> * @@ got void * @@
drivers/vhost/vhost.c:753:17: sparse: expected void [noderef] <asn:1> *
drivers/vhost/vhost.c:753:17: sparse: got void *
drivers/vhost/vhost.c:1008:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:1008:16: sparse: sparse: restricted __virtio16 degrades to integer
drivers/vhost/vhost.c:1008:16: sparse: sparse: cast to restricted __virtio16
vim +937 drivers/vhost/vhost.c
7b5d753ebc22c5 Jason Wang 2019-05-24 935
7b5d753ebc22c5 Jason Wang 2019-05-24 936 {
7b5d753ebc22c5 Jason Wang 2019-05-24 @937 return vhost_put_user(vq, cpu_to_vhost16(vq, vq->used_flags),
7b5d753ebc22c5 Jason Wang 2019-05-24 938 &vq->used->flags);
7b5d753ebc22c5 Jason Wang 2019-05-24 939 }
7b5d753ebc22c5 Jason Wang 2019-05-24 940
:::::: The code at line 937 was first introduced by commit
:::::: 7b5d753ebc22c5b6935a70ce9a857dc6220784f8 vhost: fine grain userspace memory accessors
:::::: TO: Jason Wang <jasowang@redhat.com>
:::::: CC: Michael S. Tsirkin <mst@redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25901 bytes --]
next reply other threads:[~2020-06-21 15:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-21 15:15 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-08-05 7:49 drivers/vhost/vhost.c:937:16: sparse: sparse: restricted __virtio16 degrades to integer 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=202006212331.gjsJ4DoX%lkp@intel.com \
--to=lkp@intel.com \
--cc=jasowang@redhat.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
/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