aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2012-04-16 17:07:40 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-04-18 04:34:49 -0400
commitc43b5634037ff00c83cde4ab7fc5e46831c846ef (patch)
tree38381d5ba104db965999b740c85c76e66c5003d7
parentdf0323c42ac35f81b49e25fe04e8e52b9c6f6467 (diff)
drm/i915: [sparse] trivial sparse fixes
This should contain all the changes which require no thought to make sparse happy. Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c2
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h2
-rw-r--r--drivers/gpu/drm/i915/i915_ioc32.c5
-rw-r--r--drivers/gpu/drm/i915/i915_trace_points.c2
-rw-r--r--drivers/gpu/drm/i915/intel_acpi.c1
-rw-r--r--drivers/gpu/drm/i915/intel_display.c2
-rw-r--r--drivers/gpu/drm/i915/intel_fb.c2
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c4
-rw-r--r--drivers/gpu/drm/i915/intel_sdvo.c2
9 files changed, 15 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 97c963082d4d..35462df7cefd 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1832,7 +1832,7 @@ static int i915_forcewake_open(struct inode *inode, struct file *file)
1832 return 0; 1832 return 0;
1833} 1833}
1834 1834
1835int i915_forcewake_release(struct inode *inode, struct file *file) 1835static int i915_forcewake_release(struct inode *inode, struct file *file)
1836{ 1836{
1837 struct drm_device *dev = inode->i_private; 1837 struct drm_device *dev = inode->i_private;
1838 struct drm_i915_private *dev_priv = dev->dev_private; 1838 struct drm_i915_private *dev_priv = dev->dev_private;
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 422f424deb4c..303cee71b490 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1128,8 +1128,10 @@ extern void i915_driver_preclose(struct drm_device *dev,
1128extern void i915_driver_postclose(struct drm_device *dev, 1128extern void i915_driver_postclose(struct drm_device *dev,
1129 struct drm_file *file_priv); 1129 struct drm_file *file_priv);
1130extern int i915_driver_device_is_agp(struct drm_device * dev); 1130extern int i915_driver_device_is_agp(struct drm_device * dev);
1131#ifdef CONFIG_COMPAT
1131extern long i915_compat_ioctl(struct file *filp, unsigned int cmd, 1132extern long i915_compat_ioctl(struct file *filp, unsigned int cmd,
1132 unsigned long arg); 1133 unsigned long arg);
1134#endif
1133extern int i915_emit_box(struct drm_device *dev, 1135extern int i915_emit_box(struct drm_device *dev,
1134 struct drm_clip_rect *box, 1136 struct drm_clip_rect *box,
1135 int DR1, int DR4); 1137 int DR1, int DR4);
diff --git a/drivers/gpu/drm/i915/i915_ioc32.c b/drivers/gpu/drm/i915/i915_ioc32.c
index 13b028994b2b..0e72abb9f701 100644
--- a/drivers/gpu/drm/i915/i915_ioc32.c
+++ b/drivers/gpu/drm/i915/i915_ioc32.c
@@ -34,6 +34,7 @@
34#include "drmP.h" 34#include "drmP.h"
35#include "drm.h" 35#include "drm.h"
36#include "i915_drm.h" 36#include "i915_drm.h"
37#include "i915_drv.h"
37 38
38typedef struct _drm_i915_batchbuffer32 { 39typedef struct _drm_i915_batchbuffer32 {
39 int start; /* agp offset */ 40 int start; /* agp offset */
@@ -181,7 +182,7 @@ static int compat_i915_alloc(struct file *file, unsigned int cmd,
181 (unsigned long)request); 182 (unsigned long)request);
182} 183}
183 184
184drm_ioctl_compat_t *i915_compat_ioctls[] = { 185static drm_ioctl_compat_t *i915_compat_ioctls[] = {
185 [DRM_I915_BATCHBUFFER] = compat_i915_batchbuffer, 186 [DRM_I915_BATCHBUFFER] = compat_i915_batchbuffer,
186 [DRM_I915_CMDBUFFER] = compat_i915_cmdbuffer, 187 [DRM_I915_CMDBUFFER] = compat_i915_cmdbuffer,
187 [DRM_I915_GETPARAM] = compat_i915_getparam, 188 [DRM_I915_GETPARAM] = compat_i915_getparam,
@@ -189,6 +190,7 @@ drm_ioctl_compat_t *i915_compat_ioctls[] = {
189 [DRM_I915_ALLOC] = compat_i915_alloc 190 [DRM_I915_ALLOC] = compat_i915_alloc
190}; 191};
191 192
193#ifdef CONFIG_COMPAT
192/** 194/**
193 * Called whenever a 32-bit process running under a 64-bit kernel 195 * Called whenever a 32-bit process running under a 64-bit kernel
194 * performs an ioctl on /dev/dri/card<n>. 196 * performs an ioctl on /dev/dri/card<n>.
@@ -217,3 +219,4 @@ long i915_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
217 219
218 return ret; 220 return ret;
219} 221}
222#endif
diff --git a/drivers/gpu/drm/i915/i915_trace_points.c b/drivers/gpu/drm/i915/i915_trace_points.c
index ead876eb6ea0..f1df2bd4ecf4 100644
--- a/drivers/gpu/drm/i915/i915_trace_points.c
+++ b/drivers/gpu/drm/i915/i915_trace_points.c
@@ -7,5 +7,7 @@
7 7
8#include "i915_drv.h" 8#include "i915_drv.h"
9 9
10#ifndef __CHECKER__
10#define CREATE_TRACE_POINTS 11#define CREATE_TRACE_POINTS
11#include "i915_trace.h" 12#include "i915_trace.h"
13#endif
diff --git a/drivers/gpu/drm/i915/intel_acpi.c b/drivers/gpu/drm/i915/intel_acpi.c
index f152b2a7fc54..f413899475e9 100644
--- a/drivers/gpu/drm/i915/intel_acpi.c
+++ b/drivers/gpu/drm/i915/intel_acpi.c
@@ -9,6 +9,7 @@
9#include <acpi/acpi_drivers.h> 9#include <acpi/acpi_drivers.h>
10 10
11#include "drmP.h" 11#include "drmP.h"
12#include "i915_drv.h"
12 13
13#define INTEL_DSM_REVISION_ID 1 /* For Calpella anyway... */ 14#define INTEL_DSM_REVISION_ID 1 /* For Calpella anyway... */
14 15
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index eb7ebf49f97e..78179e03a901 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9503,7 +9503,7 @@ struct intel_quirk {
9503 void (*hook)(struct drm_device *dev); 9503 void (*hook)(struct drm_device *dev);
9504}; 9504};
9505 9505
9506struct intel_quirk intel_quirks[] = { 9506static struct intel_quirk intel_quirks[] = {
9507 /* HP Mini needs pipe A force quirk (LP: #322104) */ 9507 /* HP Mini needs pipe A force quirk (LP: #322104) */
9508 { 0x27ae, 0x103c, 0x361a, quirk_pipea_force }, 9508 { 0x27ae, 0x103c, 0x361a, quirk_pipea_force },
9509 9509
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
index 19ecd78b8a2c..71ef2896be96 100644
--- a/drivers/gpu/drm/i915/intel_fb.c
+++ b/drivers/gpu/drm/i915/intel_fb.c
@@ -94,7 +94,7 @@ static int intelfb_create(struct intel_fbdev *ifbdev,
94 mutex_lock(&dev->struct_mutex); 94 mutex_lock(&dev->struct_mutex);
95 95
96 /* Flush everything out, we'll be doing GTT only from now on */ 96 /* Flush everything out, we'll be doing GTT only from now on */
97 ret = intel_pin_and_fence_fb_obj(dev, obj, false); 97 ret = intel_pin_and_fence_fb_obj(dev, obj, NULL);
98 if (ret) { 98 if (ret) {
99 DRM_ERROR("failed to pin fb: %d\n", ret); 99 DRM_ERROR("failed to pin fb: %d\n", ret);
100 goto out_unref; 100 goto out_unref;
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 9d4e5f06edc3..492812db537b 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -891,8 +891,8 @@ err:
891 return ret; 891 return ret;
892} 892}
893 893
894int intel_init_ring_buffer(struct drm_device *dev, 894static int intel_init_ring_buffer(struct drm_device *dev,
895 struct intel_ring_buffer *ring) 895 struct intel_ring_buffer *ring)
896{ 896{
897 struct drm_i915_gem_object *obj; 897 struct drm_i915_gem_object *obj;
898 int ret; 898 int ret;
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 6898145b44ce..aa1a0d5f0a5e 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1258,7 +1258,7 @@ intel_sdvo_get_analog_edid(struct drm_connector *connector)
1258 dev_priv->crt_ddc_pin)); 1258 dev_priv->crt_ddc_pin));
1259} 1259}
1260 1260
1261enum drm_connector_status 1261static enum drm_connector_status
1262intel_sdvo_tmds_sink_detect(struct drm_connector *connector) 1262intel_sdvo_tmds_sink_detect(struct drm_connector *connector)
1263{ 1263{
1264 struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector); 1264 struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector);