From 6ea77d1384ed0c2d040a1934ecc3fd7187580931 Mon Sep 17 00:00:00 2001
From: Thomas Hellstrom <thellstrom@vmware.com>
Date: Tue, 4 Oct 2011 20:13:36 +0200
Subject: vmwgfx: Minor cleanups
Git-commit: 6ea77d1384ed0c2d040a1934ecc3fd7187580931
Patch-mainline: v3.2-rc1

As suggested by Konrad Rzeszutek Wilk

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Acked-by: Michal Srb <msrb@suse.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c |    6 +++---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c |   17 +++++++++--------
 2 files changed, 12 insertions(+), 11 deletions(-)

Index: linux-3.0-SLE11-SP3/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
===================================================================
--- linux-3.0-SLE11-SP3.orig/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ linux-3.0-SLE11-SP3/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -570,9 +570,9 @@ static int vmw_driver_load(struct drm_de
 	vmw_overlay_init(dev_priv);
 
 	/* 3D Depends on Screen Objects being used. */
-	DRM_INFO("%s", vmw_fifo_have_3d(dev_priv) ?
-		 "Detected device 3D availability.\n" :
-		 "Detected no device 3D availability.\n");
+	DRM_INFO("Detected %sdevice 3D availability.\n",
+		 vmw_fifo_have_3d(dev_priv) ?
+		 "" : "no ");
 
 	/* We might be done with the fifo now */
 	if (dev_priv->enable_fb) {
Index: linux-3.0-SLE11-SP3/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
===================================================================
--- linux-3.0-SLE11-SP3.orig/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ linux-3.0-SLE11-SP3/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -1317,18 +1317,19 @@ int vmw_du_update_layout(struct vmw_priv
 	struct drm_device *dev = dev_priv->dev;
 	struct vmw_display_unit *du;
 	struct drm_connector *con;
-	int i;
 
 	mutex_lock(&dev->mode_config.mutex);
 
 #if 0
-	DRM_INFO("%s: new layout ", __func__);
-	for (i = 0; i < (int)num; i++)
-		DRM_INFO("(%i, %i %ux%u) ", rects[i].x, rects[i].y,
-			 rects[i].w, rects[i].h);
-	DRM_INFO("\n");
-#else
-	(void)i;
+	{
+		unsigned int i;
+
+		DRM_INFO("%s: new layout ", __func__);
+		for (i = 0; i < num; i++)
+			DRM_INFO("(%i, %i %ux%u) ", rects[i].x, rects[i].y,
+				 rects[i].w, rects[i].h);
+		DRM_INFO("\n");
+	}
 #endif
 
 	list_for_each_entry(con, &dev->mode_config.connector_list, head) {
