From: Jingoo Han Date: Thu, 1 Aug 2013 05:38:36 +0000 (+0900) Subject: watchdog: dw_wdt: Add __user annotation X-Git-Tag: upstream/snapshot3+hdmi~3931^2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=60295507f6abf47a40d1fd758cd4401e7193f16e;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git watchdog: dw_wdt: Add __user annotation Added __user annotation to fix the following sparse warnings. drivers/watchdog/dw_wdt.c:206:38: warning: incorrect type in argument 1 (different address spaces) drivers/watchdog/dw_wdt.c:206:38: expected void [noderef] *to drivers/watchdog/dw_wdt.c:206:38: got struct watchdog_info * drivers/watchdog/dw_wdt.c:211:24: warning: incorrect type in initializer (different address spaces) drivers/watchdog/dw_wdt.c:211:24: expected int const [noderef] *register __p drivers/watchdog/dw_wdt.c:211:24: got int * Signed-off-by: Jingoo Han Acked-by: Jamie Iles Reviewed-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c index b922bec..aed1cbe 100644 --- a/drivers/watchdog/dw_wdt.c +++ b/drivers/watchdog/dw_wdt.c @@ -203,12 +203,12 @@ static long dw_wdt_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) switch (cmd) { case WDIOC_GETSUPPORT: - return copy_to_user((struct watchdog_info *)arg, &dw_wdt_ident, + return copy_to_user((void __user *)arg, &dw_wdt_ident, sizeof(dw_wdt_ident)) ? -EFAULT : 0; case WDIOC_GETSTATUS: case WDIOC_GETBOOTSTATUS: - return put_user(0, (int *)arg); + return put_user(0, (int __user *)arg); case WDIOC_KEEPALIVE: dw_wdt_set_next_heartbeat();