Skip to content

Commit 2da9a1a

Browse files
committed
drm/compat: more dummy implementations
drm_noop really doesn't do much, and who cares about the permission checks. So let's delete some code. Acked-by: Maxime Ripard <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent e926c47 commit 2da9a1a

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

drivers/gpu/drm/drm_ioc32.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,8 @@ static int compat_drm_getstats(struct file *file, unsigned int cmd,
302302
unsigned long arg)
303303
{
304304
drm_stats32_t __user *argp = (void __user *)arg;
305-
int err;
306-
307-
err = drm_ioctl_kernel(file, drm_noop, NULL, 0);
308-
if (err)
309-
return err;
310305

306+
/* getstats is defunct, just clear */
311307
if (clear_user(argp, sizeof(drm_stats32_t)))
312308
return -EFAULT;
313309
return 0;
@@ -820,13 +816,8 @@ typedef struct drm_update_draw32 {
820816
static int compat_drm_update_draw(struct file *file, unsigned int cmd,
821817
unsigned long arg)
822818
{
823-
drm_update_draw32_t update32;
824-
825-
if (copy_from_user(&update32, (void __user *)arg, sizeof(update32)))
826-
return -EFAULT;
827-
828-
return drm_ioctl_kernel(file, drm_noop, NULL,
829-
DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY);
819+
/* update_draw is defunct */
820+
return 0;
830821
}
831822
#endif
832823

0 commit comments

Comments
 (0)