From d3cf40ed7fa1b56bd53d3b52eddf44d0e3c3ec20 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 21 Jul 2014 13:24:37 +0200 Subject: [PATCH] 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 --- drivers/gpu/drm/drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.20.1