m68k: Add missing __user annotation in get_user()
authorJason Wang <jasowang@redhat.com>
Wed, 20 May 2020 06:57:50 +0000 (14:57 +0800)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 25 May 2020 08:55:56 +0000 (10:55 +0200)
commit2941a4731fd24d5e43ef437cca90818f87fd4851
treed94984ed2f2b4aa500e67076c6087043441b1dd6
parentb2003c7a811c765f18d1495c01251c20f9e6c93a
m68k: Add missing __user annotation in get_user()

The ptr is a pointer to userspace memory. So we need annotate it with
__user otherwise we may get sparse warnings like:

drivers/vhost/vhost.c:1603:13: sparse: sparse: incorrect type in initializer (different address spaces) @@    expected void const *__gu_ptr @@    got unsigned int [noderef] [usertypvoid const *__gu_ptr @@
drivers/vhost/vhost.c:1603:13: sparse:    expected void const *__gu_ptr
drivers/vhost/vhost.c:1603:13: sparse:    got unsigned int [noderef] [usertype] <asn:1> *idxp

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Link: https://lore.kernel.org/r/20200520065750.8401-1-jasowang@redhat.com
Fixes: 7124330dabe5b3cb ("m68k/uaccess: Revive 64-bit get_user()")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
arch/m68k/include/asm/uaccess_mm.h