All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	linux-media@vger.kernel.org
Subject: Re: [PATCH v2] staging: lirc: Fix sparse warnings
Date: Thu, 8 May 2014 14:35:06 +0300	[thread overview]
Message-ID: <20140508113506.GF26890@mwanda> (raw)
In-Reply-To: <1399547597-4006-1-git-send-email-tuomas.tynkkynen@iki.fi>

On Thu, May 08, 2014 at 02:13:17PM +0300, Tuomas Tynkkynen wrote:
> Fix sparse warnings by adding __user and __iomem annotations where
> necessary and removing certain unnecessary casts. While at it,
> also use u32 in place of __u32.
> 
> Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>

Thanks.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>

Btw, don't resend this (someone will have to fix it in a later patch)
but I notice that these IOCTLs are not implemented consistently.  Even
outside of staging we have this problem.  For example lirc_rx51_ioctl().

In this function the user gets a u32.

>  	case LIRC_GET_FEATURES:
> -		result = put_user(features, (__u32 *) arg);
> +		result = put_user(features, uptr);
>  		if (result)
>  			return result;
>  		break;

But here they get a long.

>  	case LIRC_GET_FEATURES:
> -		result = put_user(features, (unsigned long *) arg);
> +		result = put_user(features, uptr);
>  		break;

My feeling it should always be u32 so we don't have to write a
compatability layer for 32 bit applications on a 64 bit kernel.

regards,
dan carpenter


      reply	other threads:[~2014-05-08 11:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-08 11:13 [PATCH v2] staging: lirc: Fix sparse warnings Tuomas Tynkkynen
2014-05-08 11:35 ` Dan Carpenter [this message]

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=20140508113506.GF26890@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=tuomas.tynkkynen@iki.fi \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.