summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2004-07-31 07:26:52 +0000
committerDave Airlie <airlied@linux.ie>2004-07-31 07:26:52 +0000
commiteb3d0635d4830969d10d5fe8aef17cebb2f3fd15 (patch)
treed48d455b9c8d04aa8b8a76992c2449a4208e64f8 /shared
parentdc4508c33845602e4c94c3e125536d01fe9110b1 (diff)
fixes for using userspace pointers found by sparse utility
From: Dave Airlie
Diffstat (limited to 'shared')
-rw-r--r--shared/i915_dma.c2
-rw-r--r--shared/i915_mem.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/shared/i915_dma.c b/shared/i915_dma.c
index e7364ffe..28820378 100644
--- a/shared/i915_dma.c
+++ b/shared/i915_dma.c
@@ -471,7 +471,7 @@ static int i915_dispatch_batchbuffer(drm_device_t *dev,
drm_i915_batchbuffer_t *batch )
{
drm_i915_private_t *dev_priv = dev->dev_private;
- drm_clip_rect_t *boxes = batch->cliprects;
+ drm_clip_rect_t __user *boxes = batch->cliprects;
int nbox = batch->num_cliprects;
int i = 0, count;
RING_LOCALS;
diff --git a/shared/i915_mem.c b/shared/i915_mem.c
index 2a2379d0..40098514 100644
--- a/shared/i915_mem.c
+++ b/shared/i915_mem.c
@@ -237,7 +237,7 @@ void i915_mem_takedown( struct mem_block **heap )
}
DRM_FREE( *heap, sizeof(**heap) );
- *heap = 0;
+ *heap = NULL;
}
@@ -249,7 +249,7 @@ static struct mem_block **get_heap( drm_i915_private_t *dev_priv,
case I915_MEM_REGION_AGP:
return &dev_priv->agp_heap;
default:
- return 0;
+ return NULL;
}
}