drm/i915: [sparse] trivial sparse fixes
authorBen Widawsky <ben@bwidawsk.net>
Mon, 16 Apr 2012 21:07:40 +0000 (14:07 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 18 Apr 2012 08:34:49 +0000 (10:34 +0200)
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>
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_ioc32.c
drivers/gpu/drm/i915/i915_trace_points.c
drivers/gpu/drm/i915/intel_acpi.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_fb.c
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_sdvo.c

index 97c963082d4d63871aa659d9985d2b4a9c78d33b..35462df7cefde182cb7fb6736bd097a5544db3f3 100644 (file)
@@ -1832,7 +1832,7 @@ static int i915_forcewake_open(struct inode *inode, struct file *file)
        return 0;
 }
 
-int i915_forcewake_release(struct inode *inode, struct file *file)
+static int i915_forcewake_release(struct inode *inode, struct file *file)
 {
        struct drm_device *dev = inode->i_private;
        struct drm_i915_private *dev_priv = dev->dev_private;
index 422f424deb4cef2b96ac21148ee2a18a0c2ddb97..303cee71b4901392712a9853f84973cf11c14a8a 100644 (file)
@@ -1128,8 +1128,10 @@ extern void i915_driver_preclose(struct drm_device *dev,
 extern void i915_driver_postclose(struct drm_device *dev,
                                  struct drm_file *file_priv);
 extern int i915_driver_device_is_agp(struct drm_device * dev);
+#ifdef CONFIG_COMPAT
 extern long i915_compat_ioctl(struct file *filp, unsigned int cmd,
                              unsigned long arg);
+#endif
 extern int i915_emit_box(struct drm_device *dev,
                         struct drm_clip_rect *box,
                         int DR1, int DR4);
index 13b028994b2be7e3c2caf4eec100560ed01358fb..0e72abb9f7016005ad549ccefdf95862e4c4f87e 100644 (file)
@@ -34,6 +34,7 @@
 #include "drmP.h"
 #include "drm.h"
 #include "i915_drm.h"
+#include "i915_drv.h"
 
 typedef struct _drm_i915_batchbuffer32 {
        int start;              /* agp offset */
@@ -181,7 +182,7 @@ static int compat_i915_alloc(struct file *file, unsigned int cmd,
                         (unsigned long)request);
 }
 
-drm_ioctl_compat_t *i915_compat_ioctls[] = {
+static drm_ioctl_compat_t *i915_compat_ioctls[] = {
        [DRM_I915_BATCHBUFFER] = compat_i915_batchbuffer,
        [DRM_I915_CMDBUFFER] = compat_i915_cmdbuffer,
        [DRM_I915_GETPARAM] = compat_i915_getparam,
@@ -189,6 +190,7 @@ drm_ioctl_compat_t *i915_compat_ioctls[] = {
        [DRM_I915_ALLOC] = compat_i915_alloc
 };
 
+#ifdef CONFIG_COMPAT
 /**
  * Called whenever a 32-bit process running under a 64-bit kernel
  * 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)
 
        return ret;
 }
+#endif
index ead876eb6ea050767f2f2e53d770fb8d19d279ab..f1df2bd4ecf4cc37010ccb990614dcacde0936e9 100644 (file)
@@ -7,5 +7,7 @@
 
 #include "i915_drv.h"
 
+#ifndef __CHECKER__
 #define CREATE_TRACE_POINTS
 #include "i915_trace.h"
+#endif
index f152b2a7fc543ae2a116ddf0cb93cc4403bdf413..f413899475e94b388526f8a036cc9c378a2ddcd4 100644 (file)
@@ -9,6 +9,7 @@
 #include <acpi/acpi_drivers.h>
 
 #include "drmP.h"
+#include "i915_drv.h"
 
 #define INTEL_DSM_REVISION_ID 1 /* For Calpella anyway... */
 
index eb7ebf49f97ecf2ee15f73280346de8b6b71e42a..78179e03a901fe7a0b67b79dc2125beabc3d84cb 100644 (file)
@@ -9503,7 +9503,7 @@ struct intel_quirk {
        void (*hook)(struct drm_device *dev);
 };
 
-struct intel_quirk intel_quirks[] = {
+static struct intel_quirk intel_quirks[] = {
        /* HP Mini needs pipe A force quirk (LP: #322104) */
        { 0x27ae, 0x103c, 0x361a, quirk_pipea_force },
 
index 19ecd78b8a2ce572c98b1407122e1d97d94c4781..71ef2896be96efe6d79e0f930b2e3d83a0e59632 100644 (file)
@@ -94,7 +94,7 @@ static int intelfb_create(struct intel_fbdev *ifbdev,
        mutex_lock(&dev->struct_mutex);
 
        /* Flush everything out, we'll be doing GTT only from now on */
-       ret = intel_pin_and_fence_fb_obj(dev, obj, false);
+       ret = intel_pin_and_fence_fb_obj(dev, obj, NULL);
        if (ret) {
                DRM_ERROR("failed to pin fb: %d\n", ret);
                goto out_unref;
index 9d4e5f06edc36a95a29515c031ccc14703e796ca..492812db537be9f78acc7c02ef8b71019acdd272 100644 (file)
@@ -891,8 +891,8 @@ err:
        return ret;
 }
 
-int intel_init_ring_buffer(struct drm_device *dev,
-                          struct intel_ring_buffer *ring)
+static int intel_init_ring_buffer(struct drm_device *dev,
+                                 struct intel_ring_buffer *ring)
 {
        struct drm_i915_gem_object *obj;
        int ret;
index 6898145b44ce92a0c4b3f8e15e50ea6b4a1037ca..aa1a0d5f0a5ed604867630e4e3265450a45ed030 100644 (file)
@@ -1258,7 +1258,7 @@ intel_sdvo_get_analog_edid(struct drm_connector *connector)
                                                    dev_priv->crt_ddc_pin));
 }
 
-enum drm_connector_status
+static enum drm_connector_status
 intel_sdvo_tmds_sink_detect(struct drm_connector *connector)
 {
        struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector);