public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: Re: [PATCH 1/4] [media] media-device: Simplify compat32 logic
Date: Thu, 24 Mar 2016 10:40:33 +0200	[thread overview]
Message-ID: <1719837.HF58P2gl46@avalon> (raw)
In-Reply-To: <442844a1add7446a8d5d2d91229fc0f043363381.1458760750.git.mchehab@osg.samsung.com>

On Wednesday 23 Mar 2016 16:27:43 Mauro Carvalho Chehab wrote:
> Only MEDIA_IOC_ENUM_LINKS32 require an special logic when
> userspace is 32 bits and Kernel is 64 bits.
> 
> For the rest, media_device_ioctl() will do the right thing,
> and will return -ENOIOCTLCMD if the ioctl is unknown.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> ---
>  drivers/media/media-device.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c
> index 4a97d92a7e7d..4b5a2ab17b7e 100644
> --- a/drivers/media/media-device.c
> +++ b/drivers/media/media-device.c
> @@ -508,10 +508,7 @@ static long media_device_compat_ioctl(struct file
> *filp, unsigned int cmd, long ret;
> 
>  	switch (cmd) {
> -	case MEDIA_IOC_DEVICE_INFO:
> -	case MEDIA_IOC_ENUM_ENTITIES:
> -	case MEDIA_IOC_SETUP_LINK:
> -	case MEDIA_IOC_G_TOPOLOGY:
> +	default:
>  		return media_device_ioctl(filp, cmd, arg);

I'd move the default case last as done usually. Apart from that,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> 
>  	case MEDIA_IOC_ENUM_LINKS32:
> @@ -520,9 +517,6 @@ static long media_device_compat_ioctl(struct file *filp,
> unsigned int cmd, (struct media_links_enum32 __user *)arg);
>  		mutex_unlock(&dev->graph_mutex);
>  		break;
> -
> -	default:
> -		ret = -ENOIOCTLCMD;
>  	}
> 
>  	return ret;

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2016-03-24  8:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23 19:27 [PATCH 0/4] Some fixes and cleanups for the Media Controller code Mauro Carvalho Chehab
2016-03-23 19:27 ` [PATCH 1/4] [media] media-device: Simplify compat32 logic Mauro Carvalho Chehab
2016-03-24  8:40   ` Laurent Pinchart [this message]
2016-03-23 19:27 ` [PATCH 2/4] [media] media-devnode: fix namespace mess Mauro Carvalho Chehab
2016-03-23 19:27 ` [PATCH 3/4] [media] media-device: get rid of a leftover comment Mauro Carvalho Chehab
2016-03-24  8:41   ` Laurent Pinchart
2016-03-23 19:27 ` [PATCH 4/4] [meida] media-device: dynamically allocate struct media_devnode Mauro Carvalho Chehab
2016-03-23 20:28   ` kbuild test robot
2016-03-24  8:24   ` Laurent Pinchart
2016-03-24 11:37     ` Mauro Carvalho Chehab
2016-04-27 22:20       ` Shuah Khan
2016-04-28 11:41         ` Mauro Carvalho Chehab
2016-04-28 14:50           ` Shuah Khan
2016-04-28 15:04             ` Mauro Carvalho Chehab
2016-04-28 16:23               ` Shuah Khan
2016-04-28 16:43                 ` Mauro Carvalho Chehab
2016-03-24 10:03 ` [PATCH 0/4] Some fixes and cleanups for the Media Controller code Sakari Ailus

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=1719837.HF58P2gl46@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mchehab@osg.samsung.com \
    /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