drm: add __user attribute to ptr_to_compat()
authorBen Dooks <ben.dooks@codethink.co.uk>
Fri, 1 Mar 2019 12:00:46 +0000 (12:00 +0000)
committerSean Paul <seanpaul@chromium.org>
Mon, 4 Mar 2019 14:55:31 +0000 (09:55 -0500)
commite552f0851070fe4975d610a99910be4e9bf5d7bd
tree54369cc1462f3a88d4f3de4426c459ec4cb6b76c
parent37406a60fac7de336dec331a8707a94462ac5a5e
drm: add __user attribute to ptr_to_compat()

The ptr_to_compat() call takes a "void __user *", so cast
the compat drm calls that use it to avoid the following
warnings from sparse:

drivers/gpu/drm/drm_ioc32.c:188:39: warning: incorrect type in argument 1 (different address spaces)
drivers/gpu/drm/drm_ioc32.c:188:39:    expected void [noderef] <asn:1>*uptr
drivers/gpu/drm/drm_ioc32.c:188:39:    got void *[addressable] [assigned] handle
drivers/gpu/drm/drm_ioc32.c:529:41: warning: incorrect type in argument 1 (different address spaces)
drivers/gpu/drm/drm_ioc32.c:529:41:    expected void [noderef] <asn:1>*uptr
drivers/gpu/drm/drm_ioc32.c:529:41:    got void *[addressable] [assigned] handle

Cc: stable@vger.kernel.org
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190301120046.26961-1-ben.dooks@codethink.co.uk
drivers/gpu/drm/drm_ioc32.c