diff mbox

[0433/1094] drm: Remove the prefix argument of drm_ut_debug_printk()

Message ID 1413889294-31328-434-git-send-email-dheerajx.s.jamwal@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dheeraj Jamwal Oct. 21, 2014, 10:50 a.m. UTC
From: "Lespiau, Damien" <damien.lespiau@intel.com>

This is always DRM_NAME, so we can just make it part of the format
string instead of asking prink to do it for us.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 1287aa903f1b9248f34fb215e3b875d2ae243425)

Signed-off-by: Dheeraj Jamwal <dheerajx.s.jamwal@intel.com>
---
 drivers/gpu/drm/drm_stub.c |    6 ++----
 include/drm/drmP.h         |   17 ++++++-----------
 2 files changed, 8 insertions(+), 15 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index 7e62e14..11af207 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -97,9 +97,7 @@  int drm_err(const char *func, const char *format, ...)
 }
 EXPORT_SYMBOL(drm_err);
 
-void drm_ut_debug_printk(const char *prefix,
-			 const char *function_name,
-			 const char *format, ...)
+void drm_ut_debug_printk(const char *function_name, const char *format, ...)
 {
 	struct va_format vaf;
 	va_list args;
@@ -108,7 +106,7 @@  void drm_ut_debug_printk(const char *prefix,
 	vaf.fmt = format;
 	vaf.va = &args;
 
-	printk(KERN_DEBUG "[%s:%s], %pV", prefix, function_name, &vaf);
+	printk(KERN_DEBUG "[" DRM_NAME ":%s], %pV", function_name, &vaf);
 
 	va_end(args);
 }
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 5271c6d..7a7d6a6 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -121,9 +121,8 @@  struct videomode;
 #define DRM_UT_KMS		0x04
 #define DRM_UT_PRIME		0x08
 
-extern __printf(3, 4)
-void drm_ut_debug_printk(const char *prefix,
-			 const char *function_name,
+extern __printf(2, 3)
+void drm_ut_debug_printk(const char *function_name,
 			 const char *format, ...);
 extern __printf(2, 3)
 int drm_err(const char *func, const char *format, ...);
@@ -209,27 +208,23 @@  int drm_err(const char *func, const char *format, ...);
 #define DRM_DEBUG(fmt, args...)						\
 	do {								\
 		if (unlikely(drm_debug & DRM_UT_CORE))			\
-			drm_ut_debug_printk(DRM_NAME, __func__,		\
-					    fmt, ##args);		\
+			drm_ut_debug_printk(__func__, fmt, ##args);	\
 	} while (0)
 
 #define DRM_DEBUG_DRIVER(fmt, args...)					\
 	do {								\
 		if (unlikely(drm_debug & DRM_UT_DRIVER))		\
-			drm_ut_debug_printk(DRM_NAME, __func__,		\
-					    fmt, ##args);		\
+			drm_ut_debug_printk(__func__, fmt, ##args);	\
 	} while (0)
 #define DRM_DEBUG_KMS(fmt, args...)					\
 	do {								\
 		if (unlikely(drm_debug & DRM_UT_KMS))			\
-			drm_ut_debug_printk(DRM_NAME, __func__,		\
-					    fmt, ##args);		\
+			drm_ut_debug_printk(__func__, fmt, ##args);	\
 	} while (0)
 #define DRM_DEBUG_PRIME(fmt, args...)					\
 	do {								\
 		if (unlikely(drm_debug & DRM_UT_PRIME))			\
-			drm_ut_debug_printk(DRM_NAME, __func__,		\
-					    fmt, ##args);		\
+			drm_ut_debug_printk(__func__, fmt, ##args);	\
 	} while (0)
 #else
 #define DRM_DEBUG_DRIVER(fmt, args...) do { } while (0)