Skip to contentSkip to conversation

drm: Fix EDID dump format

PATCH In review Jean Delvare 2 participants 2 messages Jun 27, 2011

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

PATCH 1/1 drm: Fix EDID dump format

* print_hex_dump_bytes() already includes a log level, so we shouldn't add one. That log level is KERN_DEBUG so use the same for our header for consistency.
* print_hex_dump_bytes() properly puts a newline at the end of the last line, so there is no reason why we would add another one.

---
 drivers/gpu/drm/drm_edid.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_edid.c +3 -3
@@ -184,9 +184,9 @@ drm_edid_block_valid(u8 *raw_edid)
 
 bad:
 	if (raw_edid) {
-		printk(KERN_ERR "Raw EDID:\n");
-		print_hex_dump_bytes(KERN_ERR, DUMP_PREFIX_NONE, raw_edid, EDID_LENGTH);
-		printk(KERN_ERR "\n");
+		printk(KERN_DEBUG "Raw EDID:\n");
+		print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
+				     raw_edid, EDID_LENGTH);
 	}
 	return 0;
 }
Signature · 1 line
Jean Delvare
#1 lore raw
Quoted 8 lines · Jean Delvare

* print_hex_dump_bytes() already includes a log level, so we shouldn't add one. That log level is KERN_DEBUG so use the same for our header for consistency.
* print_hex_dump_bytes() properly puts a newline at the end of the last line, so there is no reason why we would add another one.

Please also consider the alternative patch I posted here a week ago:
http://lists.freedesktop.org/archives/dri-devel/2011-June/012264.html
It preserves KERN_ERR, however it does not remove the extra newline.

Cheers,
Tormod