[PATCH] amdgpu/powerplay: Fixup printk() usage in pp_debug.h

Edward O'Callaghan funfunctor at folklore1984.net
Thu Feb 16 08:42:56 UTC 2017


We should properly prefix which kernel module this spewed
from in dmesg for consistency to the user.

Signed-off-by: Edward O'Callaghan <funfunctor at folklore1984.net>
---
 drivers/gpu/drm/amd/powerplay/inc/pp_debug.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/inc/pp_debug.h b/drivers/gpu/drm/amd/powerplay/inc/pp_debug.h
index bfdbec1..e4fad15 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/pp_debug.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/pp_debug.h
@@ -28,12 +28,12 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 
-#define PP_ASSERT_WITH_CODE(cond, msg, code)	\
-	do {					\
-		if (!(cond)) {			\
-			printk("%s\n", msg);	\
-			code;			\
-		}				\
+#define PP_ASSERT_WITH_CODE(cond, msg, code)		\
+	do {						\
+		if (!(cond)) {				\
+			pr_error("amdgpu: %s\n", msg);	\
+			code;				\
+		}					\
 	} while (0)
 
 
-- 
2.9.3



More information about the amd-gfx mailing list