Skip to contentSkip to conversation

drm/omap: remove open-coded drm_invalid_op()

PATCH In review Emil Velikov 4 participants 9 messages May 22, 2019 – Aug 6, 2019 2 messages not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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

From: Emil Velikov <[email protected]>

Cc Tomi Valkeinen <[email protected]>
---
 drivers/gpu/drm/omapdrm/omap_drv.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
drivers/gpu/drm/omapdrm/omap_drv.c +1 -15
index 1b9b6f5e48e1..672e0f8ad11c 100644
@@ -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),
Signature · 6 lines
2.21.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH 2/2 drm/nouveau: remove open-coded drm_invalid_op()

From: Emil Velikov <[email protected]>

---
 drivers/gpu/drm/nouveau/nouveau_abi16.c | 6 ------
 drivers/gpu/drm/nouveau/nouveau_abi16.h | 1 -
 drivers/gpu/drm/nouveau/nouveau_drm.c   | 2 +-
 3 files changed, 1 insertion(+), 8 deletions(-)
drivers/gpu/drm/nouveau/nouveau_abi16.c +0 -6
index c3fd5dd39ed9..0c585dc5f5c3 100644
@@ -244,12 +244,6 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
 	return 0;
 }
 
-int
-nouveau_abi16_ioctl_setparam(ABI16_IOCTL_ARGS)
-{
-	return -EINVAL;
-}
-
 int
 nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS)
 {
drivers/gpu/drm/nouveau/nouveau_abi16.h +0 -1
index 36fde1ff3ad5..9275d529b947 100644
@@ -6,7 +6,6 @@
 	struct drm_device *dev, void *data, struct drm_file *file_priv
 
 int nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS);
-int nouveau_abi16_ioctl_setparam(ABI16_IOCTL_ARGS);
 int nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS);
 int nouveau_abi16_ioctl_channel_free(ABI16_IOCTL_ARGS);
 int nouveau_abi16_ioctl_grobj_alloc(ABI16_IOCTL_ARGS);
drivers/gpu/drm/nouveau/nouveau_drm.c +1 -1
index 22cd45845e07..ed45ad2b72f2 100644
@@ -1046,7 +1046,7 @@ nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv)
 static const struct drm_ioctl_desc
 nouveau_ioctls[] = {
 	DRM_IOCTL_DEF_DRV(NOUVEAU_GETPARAM, nouveau_abi16_ioctl_getparam, DRM_AUTH|DRM_RENDER_ALLOW),
-	DRM_IOCTL_DEF_DRV(NOUVEAU_SETPARAM, nouveau_abi16_ioctl_setparam, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
+	DRM_IOCTL_DEF_DRV(NOUVEAU_SETPARAM, drm_invalid_op, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
 	DRM_IOCTL_DEF_DRV(NOUVEAU_CHANNEL_ALLOC, nouveau_abi16_ioctl_channel_alloc, DRM_AUTH|DRM_RENDER_ALLOW),
 	DRM_IOCTL_DEF_DRV(NOUVEAU_CHANNEL_FREE, nouveau_abi16_ioctl_channel_free, DRM_AUTH|DRM_RENDER_ALLOW),
 	DRM_IOCTL_DEF_DRV(NOUVEAU_GROBJ_ALLOC, nouveau_abi16_ioctl_grobj_alloc, DRM_AUTH|DRM_RENDER_ALLOW),
Signature · 6 lines
2.21.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

A message that is not in the archive (sent off-list or not yet received): 20190522150219.13913-2-emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#3 lore raw

Re: [PATCH 2/2] drm/nouveau: remove open-coded drm_invalid_op()

Quoted 6 lines · Emil Velikov

From: Emil Velikov <[email protected]>

Thanks!

Quoted 51 lines
---
 drivers/gpu/drm/nouveau/nouveau_abi16.c | 6 ------
 drivers/gpu/drm/nouveau/nouveau_abi16.h | 1 -
 drivers/gpu/drm/nouveau/nouveau_drm.c   | 2 +-
 3 files changed, 1 insertion(+), 8 deletions(-)
drivers/gpu/drm/nouveau/nouveau_abi16.c +0 -6
index c3fd5dd39ed9..0c585dc5f5c3 100644
@@ -244,12 +244,6 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
        return 0;
 }
 
-int
-nouveau_abi16_ioctl_setparam(ABI16_IOCTL_ARGS)
-{
-       return -EINVAL;
-}
-
 int
 nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS)
 {
drivers/gpu/drm/nouveau/nouveau_abi16.h +0 -1
index 36fde1ff3ad5..9275d529b947 100644
@@ -6,7 +6,6 @@
        struct drm_device *dev, void *data, struct drm_file *file_priv
 
 int nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS);
-int nouveau_abi16_ioctl_setparam(ABI16_IOCTL_ARGS);
 int nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS);
 int nouveau_abi16_ioctl_channel_free(ABI16_IOCTL_ARGS);
 int nouveau_abi16_ioctl_grobj_alloc(ABI16_IOCTL_ARGS);
drivers/gpu/drm/nouveau/nouveau_drm.c +1 -2
index 22cd45845e07..ed45ad2b72f2 100644
@@ -1046,7 +1046,7 @@ nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv)
 static const struct drm_ioctl_desc
 nouveau_ioctls[] = {
        DRM_IOCTL_DEF_DRV(NOUVEAU_GETPARAM, nouveau_abi16_ioctl_getparam, DRM_AUTH|DRM_RENDER_ALLOW),
-       DRM_IOCTL_DEF_DRV(NOUVEAU_SETPARAM, nouveau_abi16_ioctl_setparam, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
+       DRM_IOCTL_DEF_DRV(NOUVEAU_SETPARAM, drm_invalid_op, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
        DRM_IOCTL_DEF_DRV(NOUVEAU_CHANNEL_ALLOC, nouveau_abi16_ioctl_channel_alloc, DRM_AUTH|DRM_RENDER_ALLOW),
        DRM_IOCTL_DEF_DRV(NOUVEAU_CHANNEL_FREE, nouveau_abi16_ioctl_channel_free, DRM_AUTH|DRM_RENDER_ALLOW),
        DRM_IOCTL_DEF_DRV(NOUVEAU_GROBJ_ALLOC, nouveau_abi16_ioctl_grobj_alloc, DRM_AUTH|DRM_RENDER_ALLOW),
--

2.21.0

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): CACAvsv5Z7CZOirZrRB=88rCeZt0SvBvdDjbhSpOcfE9JA20hCg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#5 lore raw

Re: [PATCH 2/2] drm/nouveau: remove open-coded drm_invalid_op()

Quoted 9 lines · Ben Skeggs
Quoted 6 lines · Emil Velikov

From: Emil Velikov <[email protected]>

Thanks!

Forgot to mention, any objections if I take this through drm-misc? I'm about to send a lengthy series which will conflict with this patch, albeit trivially.

Thanks
Emil
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#6 lore raw

Re: [PATCH 2/2] drm/nouveau: remove open-coded drm_invalid_op()

Quoted 6 lines · Emil Velikov
Quoted 4 lines · Ben Skeggs
Quoted 3 lines · Emil Velikov

From: Emil Velikov <[email protected]>

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Thanks!

Forgot to mention, any objections if I take this through drm-misc? I'm about to send a lengthy series which will conflict with this patch, albeit trivially.

Go for it.

Quoted 3 lines

Thanks
Emil

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#7 lore raw

Re: [PATCH 2/2] drm/nouveau: remove open-coded drm_invalid_op()

In reply to Ben Skeggs

Hi Ben,

Quoted 10 lines · Ben Skeggs
Quoted 6 lines · Emil Velikov

From: Emil Velikov <[email protected]>

Thanks!

Sadly Dave reverted this, since the thanks wasn't spelled out as Acked-by/R-b/other.
Can you be more explicit, or alternatively feel free to pick the patch through your tree.

Thanks
Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw
In reply to Emil Velikov
Quoted 35 lines · Emil Velikov

From: Emil Velikov <[email protected]>

Cc Tomi Valkeinen <[email protected]>
---
  drivers/gpu/drm/omapdrm/omap_drv.c | 16 +---------------
  1 file changed, 1 insertion(+), 15 deletions(-)
drivers/gpu/drm/omapdrm/omap_drv.c +0 -14
index 1b9b6f5e48e1..672e0f8ad11c 100644
@@ -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,

drivers/gpu/drm/omapdrm/omap_drv.c static int ioctl_gem_info(struct drm_device *dev, void *data, · line 484

Quoted 8 lines
drivers/gpu/drm/omapdrm/omap_drv.c +1 -1
@@ -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

Signature · 6 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#9 lore raw
Quoted 36 lines · Tomi Valkeinen
Quoted 35 lines · Emil Velikov

From: Emil Velikov <[email protected]>

Cc Tomi Valkeinen <[email protected]>
---
  drivers/gpu/drm/omapdrm/omap_drv.c | 16 +---------------
  1 file changed, 1 insertion(+), 15 deletions(-)
drivers/gpu/drm/omapdrm/omap_drv.c +0 -14
index 1b9b6f5e48e1..672e0f8ad11c 100644
@@ -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),
Quoted 9 lines

drivers/gpu/drm/omapdrm/omap_drv.c static int ioctl_gem_info(struct drm_device *dev, void *data, · line 484

Quoted 6 lines
drivers/gpu/drm/omapdrm/omap_drv.c +1 -1
-	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
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw
Quoted 46 lines · Emil Velikov
Quoted 36 lines · Tomi Valkeinen
Quoted 35 lines · Emil Velikov

From: Emil Velikov <[email protected]>

Cc Tomi Valkeinen <[email protected]>
---
   drivers/gpu/drm/omapdrm/omap_drv.c | 16 +---------------
   1 file changed, 1 insertion(+), 15 deletions(-)
drivers/gpu/drm/omapdrm/omap_drv.c +0 -14
index 1b9b6f5e48e1..672e0f8ad11c 100644
@@ -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),
Quoted 9 lines

drivers/gpu/drm/omapdrm/omap_drv.c static int ioctl_gem_info(struct drm_device *dev, void *data, · line 484

Quoted 6 lines
drivers/gpu/drm/omapdrm/omap_drv.c +1 -1
-	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?

Quoted 1 line

Hoping to pick this via drm-misc, albeit I forgot to mention earlier.

Sounds fine to me.

Tomi

Signature · 6 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel