Skip to contentSkip to conversation

Fix checkpatch.pl issue.

PATCH In review Toshiaki Yamane 2 participants 3 messages Jul 8, 2012 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix checkpatch.pl issue.

-printk(KERN_ERR, to pr_err(...

---
 drivers/staging/asus_oled/asus_oled.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/asus_oled/asus_oled.c +3 -3
index 510d796..f63c1d3 100644
@@ -782,20 +782,20 @@ static int __init asus_oled_init(void)
 	oled_class = class_create(THIS_MODULE, ASUS_OLED_UNDERSCORE_NAME);
 
 	if (IS_ERR(oled_class)) {
-		printk(KERN_ERR "Error creating " ASUS_OLED_UNDERSCORE_NAME " class\n");
+		pr_err("Error creating " ASUS_OLED_UNDERSCORE_NAME " class\n");
 		return PTR_ERR(oled_class);
 	}
 
 	retval = class_create_file(oled_class, &class_attr_version.attr);
 	if (retval) {
-		printk(KERN_ERR "Error creating class version file\n");
+		pr_err("Error creating class version file\n");
 		goto error;
 	}
 
 	retval = usb_register(&oled_driver);
 
 	if (retval) {
-		printk(KERN_ERR "usb_register failed. Error number %d\n", retval);
+		pr_err("usb_register failed. Error number %d\n", retval);
 		goto error;
 	}
 
Signature · 1 line
1.7.5.4
#1 lore raw
Quoted 3 lines · Toshiaki Yamane

-printk(KERN_ERR, to pr_err(...

Hi

I submit that your subject line should be more descriptive. Perhaps something like the following:

[PATCH] asus_oled: Use pr_err(...) rather than printk(KERN_ERR ...)

The rest of your commit message could then clarify that this change was inspired by checkpatch.

HTH, Jan

#2 lore raw

I agree.

Quoted 16 lines · Jan Ceuleers
Quoted 3 lines · Toshiaki Yamane

-printk(KERN_ERR, to pr_err(...

Hi

I submit that your subject line should be more descriptive. Perhaps something like the following:

[PATCH] asus_oled: Use pr_err(...) rather than printk(KERN_ERR ...)

The rest of your commit message could then clarify that this change was inspired by checkpatch.

HTH, Jan

Signature · 10 lines
Regards,


 .
  .
...

Yamane Toshiaki

[email protected]