linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jamie Iles <jamie@jamieiles.com>
To: Jingoo Han <jg1.han@samsung.com>
Cc: 'Wim Van Sebroeck' <wim@iguana.be>,
	linux-watchdog@vger.kernel.org,
	'Guenter Roeck' <linux@roeck-us.net>,
	Jamie Iles <jamie@jamieiles.com>
Subject: Re: [PATCH] watchdog: dw_wdt: Add __user annotation
Date: Sun, 4 Aug 2013 00:11:42 +0100	[thread overview]
Message-ID: <20130803231142.GA3515@maple> (raw)
In-Reply-To: <003101ce8e79$5e7a6670$1b6f3350$@samsung.com>

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
> 
> 

  reply	other threads:[~2013-08-03 23:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-01  5:38 [PATCH] watchdog: dw_wdt: Add __user annotation Jingoo Han
2013-08-03 23:11 ` Jamie Iles [this message]
2013-10-26 15:46 ` Wim Van Sebroeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130803231142.GA3515@maple \
    --to=jamie@jamieiles.com \
    --cc=jg1.han@samsung.com \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=wim@iguana.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).