From: Thierry Reding Date: Mon, 21 Jul 2014 11:24:37 +0000 (+0200) Subject: drm: Add missing __user annotation X-Git-Tag: firefly_0821_release~176^2~3450^2~45 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d3cf40ed7fa1b56bd53d3b52eddf44d0e3c3ec20;p=firefly-linux-kernel-4.4.55.git drm: Add missing __user annotation The drm_copy_field() function copies strings into userspace buffers, so the first parameter needs to have a __user annotation to avoid warnings from the sparse checker. Signed-off-by: Thierry Reding Reviewed-by: David Herrmann Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 8218078b6133..0cc182745e31 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -233,7 +233,7 @@ module_exit(drm_core_exit); /** * Copy and IOCTL return string to user space */ -static int drm_copy_field(char *buf, size_t *buf_len, const char *value) +static int drm_copy_field(char __user *buf, size_t *buf_len, const char *value) { int len;