All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: kill yelling copy_to_user macro from i915_dma.c
@ 2012-12-16 22:20 Daniel Vetter
  0 siblings, 0 replies; only message in thread
From: Daniel Vetter @ 2012-12-16 22:20 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter

Also, don't spam dmesg with userspace-triggerable stuff.

Signed-off-by: Daniel Vetter <daniel.vetter@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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-12-16 22:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-16 22:20 [PATCH] drm/i915: kill yelling copy_to_user macro from i915_dma.c Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.