drm/qxl: make lots of things static.

/usr/lib/gcc/x86_64-linux-gnu/4.7/include/stddef.h:414:9: sparse: preprocessor token offsetof redefined
include/linux/stddef.h:17:9: this was the original definition
>> drivers/gpu/drm/qxl/qxl_drv.c:49:5: sparse: symbol 'qxl_modeset' was not declared. Should it be static?

Reported-by: kbuild test robot.
Signed-off-by: Dave Airlie <airlied@redhat.com>
diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c
index 804b411..736365e 100644
--- a/drivers/gpu/drm/qxl/qxl_cmd.c
+++ b/drivers/gpu/drm/qxl/qxl_cmd.c
@@ -144,8 +144,8 @@
 	return 0;
 }
 
-bool qxl_ring_pop(struct qxl_ring *ring,
-		  void *element)
+static bool qxl_ring_pop(struct qxl_ring *ring,
+			 void *element)
 {
 	volatile struct qxl_ring_header *header = &(ring->ring->header);
 	volatile uint8_t *ring_elt;
@@ -169,23 +169,6 @@
 	return true;
 }
 
-void qxl_ring_wait_idle(struct qxl_ring *ring)
-{
-	struct qxl_ring_header *header = &(ring->ring->header);
-	unsigned long flags;
-
-	spin_lock_irqsave(&ring->lock, flags);
-	if (ring->ring->header.cons < ring->ring->header.prod) {
-		header->notify_on_cons = header->prod;
-		mb();
-		spin_unlock_irqrestore(&ring->lock, flags);
-		wait_event_interruptible(*ring->push_event,
-					 qxl_check_idle(ring));
-		spin_lock_irqsave(&ring->lock, flags);
-	}
-	spin_unlock_irqrestore(&ring->lock, flags);
-}
-
 int
 qxl_push_command_ring_release(struct qxl_device *qdev, struct qxl_release *release,
 			      uint32_t type, bool interruptible)
@@ -609,7 +592,7 @@
 	return ret;
 }
 
-void qxl_surface_evict_locked(struct qxl_device *qdev, struct qxl_bo *surf, bool do_update_area)
+static void qxl_surface_evict_locked(struct qxl_device *qdev, struct qxl_bo *surf, bool do_update_area)
 {
 	/* no need to update area if we are just freeing the surface normally */
 	if (do_update_area)
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index c80ddfe..567a532 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -413,11 +413,11 @@
 	kfree(qxl_fb);
 }
 
-int qxl_framebuffer_surface_dirty(struct drm_framebuffer *fb,
-				  struct drm_file *file_priv,
-				  unsigned flags, unsigned color,
-				  struct drm_clip_rect *clips,
-				  unsigned num_clips)
+static int qxl_framebuffer_surface_dirty(struct drm_framebuffer *fb,
+					 struct drm_file *file_priv,
+					 unsigned flags, unsigned color,
+					 struct drm_clip_rect *clips,
+					 unsigned num_clips)
 {
 	/* TODO: vmwgfx where this was cribbed from had locking. Why? */
 	struct qxl_framebuffer *qxl_fb = to_qxl_framebuffer(fb);
@@ -619,7 +619,7 @@
 	DRM_DEBUG("\n");
 }
 
-void qxl_crtc_load_lut(struct drm_crtc *crtc)
+static void qxl_crtc_load_lut(struct drm_crtc *crtc)
 {
 	DRM_DEBUG("\n");
 }
@@ -633,7 +633,7 @@
 	.load_lut = qxl_crtc_load_lut,
 };
 
-int qdev_crtc_init(struct drm_device *dev, int num_crtc)
+static int qdev_crtc_init(struct drm_device *dev, int num_crtc)
 {
 	struct qxl_crtc *qxl_crtc;
 
@@ -764,7 +764,7 @@
 	return MODE_OK;
 }
 
-struct drm_encoder *qxl_best_encoder(struct drm_connector *connector)
+static struct drm_encoder *qxl_best_encoder(struct drm_connector *connector)
 {
 	struct qxl_output *qxl_output =
 		drm_connector_to_qxl_output(connector);
@@ -855,7 +855,7 @@
 	.destroy = qxl_enc_destroy,
 };
 
-int qdev_output_init(struct drm_device *dev, int num_output)
+static int qdev_output_init(struct drm_device *dev, int num_output)
 {
 	struct qxl_output *qxl_output;
 	struct drm_connector *connector;
diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c
index d337da0..aa291d8a 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.c
+++ b/drivers/gpu/drm/qxl/qxl_drv.c
@@ -46,7 +46,7 @@
 };
 MODULE_DEVICE_TABLE(pci, pciidlist);
 
-int qxl_modeset = -1;
+static int qxl_modeset = -1;
 
 MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
 module_param_named(modeset, qxl_modeset, int, 0400);
diff --git a/drivers/gpu/drm/qxl/qxl_fb.c b/drivers/gpu/drm/qxl/qxl_fb.c
index 232b52b..b3c5127 100644
--- a/drivers/gpu/drm/qxl/qxl_fb.c
+++ b/drivers/gpu/drm/qxl/qxl_fb.c
@@ -159,7 +159,7 @@
 };
 
 
-struct fb_deferred_io qxl_defio = {
+static struct fb_deferred_io qxl_defio = {
 	.delay		= QXL_DIRTY_DELAY,
 	.deferred_io	= qxl_deferred_io,
 };
diff --git a/drivers/gpu/drm/qxl/qxl_gem.c b/drivers/gpu/drm/qxl/qxl_gem.c
index adc1ee2..a235693 100644
--- a/drivers/gpu/drm/qxl/qxl_gem.c
+++ b/drivers/gpu/drm/qxl/qxl_gem.c
@@ -127,35 +127,6 @@
 	}
 }
 
-int qxl_gem_set_domain(struct drm_gem_object *gobj,
-			  uint32_t rdomain, uint32_t wdomain)
-{
-	struct qxl_bo *qobj;
-	uint32_t domain;
-	int r;
-
-	/* FIXME: reeimplement */
-	qobj = gobj->driver_private;
-	/* work out where to validate the buffer to */
-	domain = wdomain;
-	if (!domain)
-		domain = rdomain;
-	if (!domain) {
-		/* Do nothings */
-		pr_warn("Set domain withou domain !\n");
-		return 0;
-	}
-	if (domain == QXL_GEM_DOMAIN_CPU) {
-		/* Asking for cpu access wait for object idle */
-		r = qxl_bo_wait(qobj, NULL, false);
-		if (r) {
-			pr_err("Failed to wait for object !\n");
-			return r;
-		}
-	}
-	return 0;
-}
-
 int qxl_gem_object_open(struct drm_gem_object *obj, struct drm_file *file_priv)
 {
 	return 0;
diff --git a/drivers/gpu/drm/qxl/qxl_ioctl.c b/drivers/gpu/drm/qxl/qxl_ioctl.c
index 83ca4f7..cec6172 100644
--- a/drivers/gpu/drm/qxl/qxl_ioctl.c
+++ b/drivers/gpu/drm/qxl/qxl_ioctl.c
@@ -30,8 +30,8 @@
  * TODO: allocating a new gem(in qxl_bo) for each request.
  * This is wasteful since bo's are page aligned.
  */
-int qxl_alloc_ioctl(struct drm_device *dev, void *data,
-		    struct drm_file *file_priv)
+static int qxl_alloc_ioctl(struct drm_device *dev, void *data,
+			   struct drm_file *file_priv)
 {
 	struct qxl_device *qdev = dev->dev_private;
 	struct drm_qxl_alloc *qxl_alloc = data;
@@ -58,8 +58,8 @@
 	return 0;
 }
 
-int qxl_map_ioctl(struct drm_device *dev, void *data,
-		  struct drm_file *file_priv)
+static int qxl_map_ioctl(struct drm_device *dev, void *data,
+			 struct drm_file *file_priv)
 {
 	struct qxl_device *qdev = dev->dev_private;
 	struct drm_qxl_map *qxl_map = data;
@@ -101,9 +101,9 @@
 }
 
 /* return holding the reference to this object */
-struct qxl_bo *qxlhw_handle_to_bo(struct qxl_device *qdev,
-				  struct drm_file *file_priv, uint64_t handle,
-				  struct qxl_reloc_list *reloc_list)
+static struct qxl_bo *qxlhw_handle_to_bo(struct qxl_device *qdev,
+					 struct drm_file *file_priv, uint64_t handle,
+					 struct qxl_reloc_list *reloc_list)
 {
 	struct drm_gem_object *gobj;
 	struct qxl_bo *qobj;
@@ -129,8 +129,8 @@
  * However, the command as passed from user space must *not* contain the initial
  * QXLReleaseInfo struct (first XXX bytes)
  */
-int qxl_execbuffer_ioctl(struct drm_device *dev, void *data,
-			 struct drm_file *file_priv)
+static int qxl_execbuffer_ioctl(struct drm_device *dev, void *data,
+				struct drm_file *file_priv)
 {
 	struct qxl_device *qdev = dev->dev_private;
 	struct drm_qxl_execbuffer *execbuffer = data;
@@ -266,8 +266,8 @@
 	return 0;
 }
 
-int qxl_update_area_ioctl(struct drm_device *dev, void *data,
-			  struct drm_file *file)
+static int qxl_update_area_ioctl(struct drm_device *dev, void *data,
+				 struct drm_file *file)
 {
 	struct qxl_device *qdev = dev->dev_private;
 	struct drm_qxl_update_area *update_area = data;
diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c
index 036e0de..85127ed 100644
--- a/drivers/gpu/drm/qxl/qxl_kms.c
+++ b/drivers/gpu/drm/qxl/qxl_kms.c
@@ -230,7 +230,7 @@
 	return 0;
 }
 
-void qxl_device_fini(struct qxl_device *qdev)
+static void qxl_device_fini(struct qxl_device *qdev)
 {
 	if (qdev->current_release_bo[0])
 		qxl_bo_unref(&qdev->current_release_bo[0]);
diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drivers/gpu/drm/qxl/qxl_release.c
index 1600781..c4267c7 100644
--- a/drivers/gpu/drm/qxl/qxl_release.c
+++ b/drivers/gpu/drm/qxl/qxl_release.c
@@ -117,8 +117,8 @@
 	release->bos[release->bo_count++] = qxl_bo_ref(bo);
 }
 
-int qxl_release_bo_alloc(struct qxl_device *qdev,
-			 struct qxl_bo **bo)
+static int qxl_release_bo_alloc(struct qxl_device *qdev,
+				struct qxl_bo **bo)
 {
 	int ret;
 	ret = qxl_bo_create(qdev, PAGE_SIZE, false, QXL_GEM_DOMAIN_VRAM, NULL,
diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
index aa9fb9a..1a86242 100644
--- a/drivers/gpu/drm/qxl/qxl_ttm.c
+++ b/drivers/gpu/drm/qxl/qxl_ttm.c
@@ -315,9 +315,9 @@
 	ttm_pool_unpopulate(ttm);
 }
 
-struct ttm_tt *qxl_ttm_tt_create(struct ttm_bo_device *bdev,
-				 unsigned long size, uint32_t page_flags,
-				 struct page *dummy_read_page)
+static struct ttm_tt *qxl_ttm_tt_create(struct ttm_bo_device *bdev,
+					unsigned long size, uint32_t page_flags,
+					struct page *dummy_read_page)
 {
 	struct qxl_device *qdev;
 	struct qxl_ttm_tt *gtt;