[PATCH 4/5] drm/vmwgfx: remove custom ioctl io encoding check

Emil Velikov emil.l.velikov at gmail.com
Wed May 22 16:41:18 UTC 2019


From: Emil Velikov <emil.velikov at collabora.com>

Drop the custom ioctl io encoding check - core drm does it for us.

Cc: "VMware Graphics" <linux-graphics-maintainer at vmware.com>
Cc: Thomas Hellstrom <thellstrom at vmware.com>
Cc: Daniel Vetter <daniel at ffwll.ch>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 2cb6ae219e43..f65542639b55 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -1147,9 +1147,6 @@ static long vmw_generic_ioctl(struct file *filp, unsigned int cmd,
 				return -EACCES;
 		}
 
-		if (unlikely(ioctl->cmd != cmd))
-			goto out_io_encoding;
-
 		flags = ioctl->flags;
 	} else if (!drm_ioctl_flags(nr, &flags))
 		return -EINVAL;
@@ -1169,12 +1166,6 @@ static long vmw_generic_ioctl(struct file *filp, unsigned int cmd,
 		ttm_read_unlock(&vmaster->lock);
 
 	return ret;
-
-out_io_encoding:
-	DRM_ERROR("Invalid command format, ioctl %d\n",
-		  nr - DRM_COMMAND_BASE);
-
-	return -EINVAL;
 }
 
 static long vmw_unlocked_ioctl(struct file *filp, unsigned int cmd,
-- 
2.21.0



More information about the dri-devel mailing list