drm: Kill DRM_COPY_(TO|FROM)_USER
Less yelling ftw! Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:

committed by
Dave Airlie

parent
57ed0f7b43
commit
1d6ac185c3
@@ -1075,10 +1075,10 @@ static int mga_dma_get_buffers(struct drm_device *dev,
|
||||
|
||||
buf->file_priv = file_priv;
|
||||
|
||||
if (DRM_COPY_TO_USER(&d->request_indices[i],
|
||||
if (copy_to_user(&d->request_indices[i],
|
||||
&buf->idx, sizeof(buf->idx)))
|
||||
return -EFAULT;
|
||||
if (DRM_COPY_TO_USER(&d->request_sizes[i],
|
||||
if (copy_to_user(&d->request_sizes[i],
|
||||
&buf->total, sizeof(buf->total)))
|
||||
return -EFAULT;
|
||||
|
||||
|
@@ -1029,7 +1029,7 @@ static int mga_getparam(struct drm_device *dev, void *data, struct drm_file *fil
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (DRM_COPY_TO_USER(param->value, &value, sizeof(int))) {
|
||||
if (copy_to_user(param->value, &value, sizeof(int))) {
|
||||
DRM_ERROR("copy_to_user\n");
|
||||
return -EFAULT;
|
||||
}
|
||||
|
Reference in New Issue
Block a user