* [PATCH] watchdog: dw_wdt: Add __user annotation
@ 2013-08-01 5:38 Jingoo Han
2013-08-03 23:11 ` Jamie Iles
2013-10-26 15:46 ` Wim Van Sebroeck
0 siblings, 2 replies; 3+ messages in thread
From: Jingoo Han @ 2013-08-01 5:38 UTC (permalink / raw)
To: 'Wim Van Sebroeck'
Cc: linux-watchdog, 'Guenter Roeck', Jamie Iles,
'Jingoo Han'
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] <asn:1>*to
drivers/watchdog/dw_wdt.c:206:38: got struct watchdog_info *<noident>
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] <asn:1>*register __p
drivers/watchdog/dw_wdt.c:211:24: got int *<noident>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/watchdog/dw_wdt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
index e621098..cd5befb 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();
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] watchdog: dw_wdt: Add __user annotation
2013-08-01 5:38 [PATCH] watchdog: dw_wdt: Add __user annotation Jingoo Han
@ 2013-08-03 23:11 ` Jamie Iles
2013-10-26 15:46 ` Wim Van Sebroeck
1 sibling, 0 replies; 3+ messages in thread
From: Jamie Iles @ 2013-08-03 23:11 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Wim Van Sebroeck', linux-watchdog,
'Guenter Roeck', Jamie Iles
Hi Jingoo,
On Thu, Aug 01, 2013 at 02:38:36PM +0900, Jingoo Han wrote:
> 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] <asn:1>*to
> drivers/watchdog/dw_wdt.c:206:38: got struct watchdog_info *<noident>
> 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] <asn:1>*register __p
> drivers/watchdog/dw_wdt.c:211:24: got int *<noident>
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
This looks good to me, thanks.
Acked-by: Jamie Iles <jamie@jamieiles.com>
> ---
> drivers/watchdog/dw_wdt.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
> index e621098..cd5befb 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();
> --
> 1.7.10.4
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] watchdog: dw_wdt: Add __user annotation
2013-08-01 5:38 [PATCH] watchdog: dw_wdt: Add __user annotation Jingoo Han
2013-08-03 23:11 ` Jamie Iles
@ 2013-10-26 15:46 ` Wim Van Sebroeck
1 sibling, 0 replies; 3+ messages in thread
From: Wim Van Sebroeck @ 2013-10-26 15:46 UTC (permalink / raw)
To: Jingoo Han; +Cc: linux-watchdog, 'Guenter Roeck', Jamie Iles
Hi Jingoo,
> 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] <asn:1>*to
> drivers/watchdog/dw_wdt.c:206:38: got struct watchdog_info *<noident>
> 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] <asn:1>*register __p
> drivers/watchdog/dw_wdt.c:211:24: got int *<noident>
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Added to linux-watchdog-next.
Kind regards,
Wim.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-26 15:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-01 5:38 [PATCH] watchdog: dw_wdt: Add __user annotation Jingoo Han
2013-08-03 23:11 ` Jamie Iles
2013-10-26 15:46 ` Wim Van Sebroeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).