Re: [PATCH 1/4] [media] media-device: Simplify compat32 logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxxx>

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

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux