[1/2] drm/omap: remove open-coded drm_invalid_op()

Submitted by Emil Velikov on May 22, 2019, 3:02 p.m.

Details

Message ID 20190522150219.13913-1-emil.l.velikov@gmail.com
State Accepted
Commit 9a671c214531e3cbfe46188c76c917132a36fe99
Headers show
Series "Series without cover letter" ( rev: 1 ) in DRI devel

Not browsing as part of any series.

Commit Message

Emil Velikov May 22, 2019, 3:02 p.m.
From: Emil Velikov <emil.velikov@collabora.com>

Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
---
 drivers/gpu/drm/omapdrm/omap_drv.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index 1b9b6f5e48e1..672e0f8ad11c 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -439,20 +439,6 @@  static int ioctl_get_param(struct drm_device *dev, void *data,
 	return 0;
 }
 
-static int ioctl_set_param(struct drm_device *dev, void *data,
-		struct drm_file *file_priv)
-{
-	struct drm_omap_param *args = data;
-
-	switch (args->param) {
-	default:
-		DBG("unknown parameter %lld", args->param);
-		return -EINVAL;
-	}
-
-	return 0;
-}
-
 #define OMAP_BO_USER_MASK	0x00ffffff	/* flags settable by userspace */
 
 static int ioctl_gem_new(struct drm_device *dev, void *data,
@@ -492,7 +478,7 @@  static int ioctl_gem_info(struct drm_device *dev, void *data,
 static const struct drm_ioctl_desc ioctls[DRM_COMMAND_END - DRM_COMMAND_BASE] = {
 	DRM_IOCTL_DEF_DRV(OMAP_GET_PARAM, ioctl_get_param,
 			  DRM_AUTH | DRM_RENDER_ALLOW),
-	DRM_IOCTL_DEF_DRV(OMAP_SET_PARAM, ioctl_set_param,
+	DRM_IOCTL_DEF_DRV(OMAP_SET_PARAM, drm_invalid_op,
 			  DRM_AUTH | DRM_MASTER | DRM_ROOT_ONLY),
 	DRM_IOCTL_DEF_DRV(OMAP_GEM_NEW, ioctl_gem_new,
 			  DRM_AUTH | DRM_RENDER_ALLOW),

Comments

On 22/05/2019 18:02, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov@collabora.com>
> 
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
> ---
>   drivers/gpu/drm/omapdrm/omap_drv.c | 16 +---------------
>   1 file changed, 1 insertion(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
> index 1b9b6f5e48e1..672e0f8ad11c 100644
> --- a/drivers/gpu/drm/omapdrm/omap_drv.c
> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c
> @@ -439,20 +439,6 @@ static int ioctl_get_param(struct drm_device *dev, void *data,
>   	return 0;
>   }
>   
> -static int ioctl_set_param(struct drm_device *dev, void *data,
> -		struct drm_file *file_priv)
> -{
> -	struct drm_omap_param *args = data;
> -
> -	switch (args->param) {
> -	default:
> -		DBG("unknown parameter %lld", args->param);
> -		return -EINVAL;
> -	}
> -
> -	return 0;
> -}
> -
>   #define OMAP_BO_USER_MASK	0x00ffffff	/* flags settable by userspace */
>   
>   static int ioctl_gem_new(struct drm_device *dev, void *data,
> @@ -492,7 +478,7 @@ static int ioctl_gem_info(struct drm_device *dev, void *data,
>   static const struct drm_ioctl_desc ioctls[DRM_COMMAND_END - DRM_COMMAND_BASE] = {
>   	DRM_IOCTL_DEF_DRV(OMAP_GET_PARAM, ioctl_get_param,
>   			  DRM_AUTH | DRM_RENDER_ALLOW),
> -	DRM_IOCTL_DEF_DRV(OMAP_SET_PARAM, ioctl_set_param,
> +	DRM_IOCTL_DEF_DRV(OMAP_SET_PARAM, drm_invalid_op,
>   			  DRM_AUTH | DRM_MASTER | DRM_ROOT_ONLY),
>   	DRM_IOCTL_DEF_DRV(OMAP_GEM_NEW, ioctl_gem_new,
>   			  DRM_AUTH | DRM_RENDER_ALLOW),
> 

Thanks! Do you want to take this via drm-misc too, or can I pick it up?

  Tomi
On 2019/05/28, Tomi Valkeinen wrote:
> On 22/05/2019 18:02, Emil Velikov wrote:
> > From: Emil Velikov <emil.velikov@collabora.com>
> > 
> > Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> > Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
> > ---
> >   drivers/gpu/drm/omapdrm/omap_drv.c | 16 +---------------
> >   1 file changed, 1 insertion(+), 15 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
> > index 1b9b6f5e48e1..672e0f8ad11c 100644
> > --- a/drivers/gpu/drm/omapdrm/omap_drv.c
> > +++ b/drivers/gpu/drm/omapdrm/omap_drv.c
> > @@ -439,20 +439,6 @@ static int ioctl_get_param(struct drm_device *dev, void *data,
> >   	return 0;
> >   }
> > -static int ioctl_set_param(struct drm_device *dev, void *data,
> > -		struct drm_file *file_priv)
> > -{
> > -	struct drm_omap_param *args = data;
> > -
> > -	switch (args->param) {
> > -	default:
> > -		DBG("unknown parameter %lld", args->param);
> > -		return -EINVAL;
> > -	}
> > -
> > -	return 0;
> > -}
> > -
> >   #define OMAP_BO_USER_MASK	0x00ffffff	/* flags settable by userspace */
> >   static int ioctl_gem_new(struct drm_device *dev, void *data,
> > @@ -492,7 +478,7 @@ static int ioctl_gem_info(struct drm_device *dev, void *data,
> >   static const struct drm_ioctl_desc ioctls[DRM_COMMAND_END - DRM_COMMAND_BASE] = {
> >   	DRM_IOCTL_DEF_DRV(OMAP_GET_PARAM, ioctl_get_param,
> >   			  DRM_AUTH | DRM_RENDER_ALLOW),
> > -	DRM_IOCTL_DEF_DRV(OMAP_SET_PARAM, ioctl_set_param,
> > +	DRM_IOCTL_DEF_DRV(OMAP_SET_PARAM, drm_invalid_op,
> >   			  DRM_AUTH | DRM_MASTER | DRM_ROOT_ONLY),
> >   	DRM_IOCTL_DEF_DRV(OMAP_GEM_NEW, ioctl_gem_new,
> >   			  DRM_AUTH | DRM_RENDER_ALLOW),
> > 
> 
> Thanks! Do you want to take this via drm-misc too, or can I pick it up?
> 
Hoping to pick this via drm-misc, albeit I forgot to mention earlier.

Thanks
Emil
On 28/05/2019 18:41, Emil Velikov wrote:
> On 2019/05/28, Tomi Valkeinen wrote:
>> On 22/05/2019 18:02, Emil Velikov wrote:
>>> From: Emil Velikov <emil.velikov@collabora.com>
>>>
>>> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
>>> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
>>> ---
>>>    drivers/gpu/drm/omapdrm/omap_drv.c | 16 +---------------
>>>    1 file changed, 1 insertion(+), 15 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
>>> index 1b9b6f5e48e1..672e0f8ad11c 100644
>>> --- a/drivers/gpu/drm/omapdrm/omap_drv.c
>>> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c
>>> @@ -439,20 +439,6 @@ static int ioctl_get_param(struct drm_device *dev, void *data,
>>>    	return 0;
>>>    }
>>> -static int ioctl_set_param(struct drm_device *dev, void *data,
>>> -		struct drm_file *file_priv)
>>> -{
>>> -	struct drm_omap_param *args = data;
>>> -
>>> -	switch (args->param) {
>>> -	default:
>>> -		DBG("unknown parameter %lld", args->param);
>>> -		return -EINVAL;
>>> -	}
>>> -
>>> -	return 0;
>>> -}
>>> -
>>>    #define OMAP_BO_USER_MASK	0x00ffffff	/* flags settable by userspace */
>>>    static int ioctl_gem_new(struct drm_device *dev, void *data,
>>> @@ -492,7 +478,7 @@ static int ioctl_gem_info(struct drm_device *dev, void *data,
>>>    static const struct drm_ioctl_desc ioctls[DRM_COMMAND_END - DRM_COMMAND_BASE] = {
>>>    	DRM_IOCTL_DEF_DRV(OMAP_GET_PARAM, ioctl_get_param,
>>>    			  DRM_AUTH | DRM_RENDER_ALLOW),
>>> -	DRM_IOCTL_DEF_DRV(OMAP_SET_PARAM, ioctl_set_param,
>>> +	DRM_IOCTL_DEF_DRV(OMAP_SET_PARAM, drm_invalid_op,
>>>    			  DRM_AUTH | DRM_MASTER | DRM_ROOT_ONLY),
>>>    	DRM_IOCTL_DEF_DRV(OMAP_GEM_NEW, ioctl_gem_new,
>>>    			  DRM_AUTH | DRM_RENDER_ALLOW),
>>>
>>
>> Thanks! Do you want to take this via drm-misc too, or can I pick it up?
>>
> Hoping to pick this via drm-misc, albeit I forgot to mention earlier.

Sounds fine to me.

Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

  Tomi