Skip to contentSkip to conversation

drm: modes: add missing [drm] to message printing

PATCH Applied LABBE Corentin 4 participants 4 messages Feb 4, 2016 – Feb 9, 2016

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

PATCH 1/1 drm: modes: add missing [drm] to message printing

The warning message in drm_mode_parse_command_line_for_connector miss the [drm] at beginning.
This patch add it and take the opportunity to convert printk(KERN_WARNING to pr_warn()

---
 drivers/gpu/drm/drm_modes.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/drm_modes.c +1 -2
index 20775c0..f7448a5 100644
@@ -1371,8 +1371,7 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option,
 	}
 done:
 	if (i >= 0) {
-		printk(KERN_WARNING
-			"parse error at position %i in video mode '%s'\n",
+		pr_warn("[drm] parse error at position %i in video mode '%s'\n",
 			i, name);
 		mode->specified = false;
 		return false;
Signature · 1 line
2.4.10
#1 lore raw

Hi,

Quoted 15 lines · LABBE Corentin

The warning message in drm_mode_parse_command_line_for_connector miss the [drm] at beginning.
This patch add it and take the opportunity to convert printk(KERN_WARNING to pr_warn()

---
 drivers/gpu/drm/drm_modes.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/drm_modes.c +0 -0
index 20775c0..f7448a5 100644

drivers/gpu/drm/drm_modes.c bool drm_mode_parse_command_line_for_connector(const char *mode_option, · line 1375

Quoted 7 lines
drivers/gpu/drm/drm_modes.c +1 -2
@@ -1371,8 +1371,7 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option,
 	}
 done:
 	if (i >= 0) {
-		printk(KERN_WARNING
-			"parse error at position %i in video mode '%s'\n",
+		pr_warn("[drm] parse error at position %i in video mode '%s'\n",
 			i, name);

Hm, maybe it's warranted to add a DRM_WARNING macro to include/drm/drmP.h and use that instead?

Best regards,

Lukas

Quoted 9 lines
drivers/gpu/drm/drm_modes.c +0 -0
 		mode->specified = false;
 		return false;
Signature · 6 lines
2.4.10

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
Quoted 13 lines · Lukas Wunner

Hi,

Quoted 10 lines · LABBE Corentin

The warning message in drm_mode_parse_command_line_for_connector miss the [drm] at beginning.
This patch add it and take the opportunity to convert printk(KERN_WARNING to pr_warn()

---
 drivers/gpu/drm/drm_modes.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Quoted 15 lines

drivers/gpu/drm/drm_modes.c bool drm_mode_parse_command_line_for_connector(const char *mode_option, · line 1375

Quoted 12 lines
drivers/gpu/drm/drm_modes.c +1 -2
index 20775c0..f7448a5 100644
@@ -1371,8 +1371,7 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option,
 	}
 done:
 	if (i >= 0) {
-		printk(KERN_WARNING
-			"parse error at position %i in video mode '%s'\n",
+		pr_warn("[drm] parse error at position %i in video mode '%s'\n",
 			i, name);

Hm, maybe it's warranted to add a DRM_WARNING macro to include/drm/drmP.h and use that instead?

I think it's good as-is for now. We have this all over the place, and I'd rather see a concerted effort moving away from all this custom stuff than having a one-off definition for a single patch. And that probably needs some more discussion, not worth blocking this patch for that.

For pr_warn and friends, one approach is defining pr_fmt() macro at the top.

BR,
Jani.

Quoted 18 lines

Best regards,

Lukas

Quoted 9 lines
drivers/gpu/drm/drm_modes.c +0 -0
 		mode->specified = false;
 		return false;
Signature · 6 lines
2.4.10

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw
In reply to LABBE Corentin
Quoted 6 lines · LABBE Corentin

The warning message in drm_mode_parse_command_line_for_connector miss the [drm] at beginning.
This patch add it and take the opportunity to convert printk(KERN_WARNING to pr_warn()

Applied to drm-misc, thanks.
-Daniel

Quoted 25 lines
---
 drivers/gpu/drm/drm_modes.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/drm_modes.c +1 -2
index 20775c0..f7448a5 100644
@@ -1371,8 +1371,7 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option,
 	}
 done:
 	if (i >= 0) {
-		printk(KERN_WARNING
-			"parse error at position %i in video mode '%s'\n",
+		pr_warn("[drm] parse error at position %i in video mode '%s'\n",
 			i, name);
 		mode->specified = false;
 		return false;
Signature · 6 lines
2.4.10

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel