[Intel-gfx] [PATCH] drm/i915: kill yelling copy_to_user macro from i915_dma.c
Daniel Vetter
daniel.vetter at ffwll.ch
Sun Dec 16 23:20:42 CET 2012
Also, don't spam dmesg with userspace-triggerable stuff.
Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
drivers/gpu/drm/i915/i915_dma.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 55115b1..171713a 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -821,8 +821,7 @@ static int i915_irq_emit(struct drm_device *dev, void *data,
result = i915_emit_irq(dev);
mutex_unlock(&dev->struct_mutex);
- if (DRM_COPY_TO_USER(emit->irq_seq, &result, sizeof(int))) {
- DRM_ERROR("copy_to_user\n");
+ if (copy_to_user(emit->irq_seq, &result, sizeof(int))) {
return -EFAULT;
}
@@ -990,8 +989,7 @@ static int i915_getparam(struct drm_device *dev, void *data,
return -EINVAL;
}
- if (DRM_COPY_TO_USER(param->value, &value, sizeof(int))) {
- DRM_ERROR("DRM_COPY_TO_USER failed\n");
+ if (copy_to_user(param->value, &value, sizeof(int))) {
return -EFAULT;
}
--
1.7.11.4
More information about the Intel-gfx
mailing list