Skip to contentSkip to conversation

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

PATCH In review Edward O'Callaghan 1 participant 2 messages Feb 16, 2017 – Feb 18, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

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

---
 drivers/gpu/drm/amd/powerplay/inc/pp_debug.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/powerplay/inc/pp_debug.h +6 -6
index bfdbec1..e4fad15 100644
@@ -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)
 
 
Signature · 6 lines
2.9.3

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20170216084256.14790-1-funfunctor-dczkZgxz+BNUPWh3PAxdjQ@public.gmane.org

#2 lore raw

disregard this, sorry for the noise.

Quoted 22 lines · Edward O'Callaghan

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

---
 drivers/gpu/drm/amd/powerplay/inc/pp_debug.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/powerplay/inc/pp_debug.h +0 -5
index bfdbec1..e4fad15 100644
@@ -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;			\

drivers/gpu/drm/amd/powerplay/inc/pp_debug.h line 39

Quoted 10 lines
drivers/gpu/drm/amd/powerplay/inc/pp_debug.h +6 -1
-		}				\
+#define PP_ASSERT_WITH_CODE(cond, msg, code)		\
+	do {						\
+		if (!(cond)) {				\
+			pr_error("amdgpu: %s\n", msg);	\
+			code;				\
+		}					\
 	} while (0)
 
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx