Skip to contentSkip to conversation

staging: wilc1000: Replace printk() with pr_info().

PATCH Superseded Elise Lennion 2 participants 3 messages Oct 9, 2016 – Oct 10, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 3/4 staging: wilc1000: Replace printk() with pr_info().

Fix checkpatch warning:

WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...

Replace printk(KERN_INFO...) by pr_info() for more uniform error reporting.

---
 drivers/staging/wilc1000/wilc_debugfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/wilc_debugfs.c +3 -3
index 802bb1d..07260c4 100644
@@ -62,16 +62,16 @@ static ssize_t wilc_debug_level_write(struct file *filp, const char __user *buf,
 		return ret;
 
 	if (flag > DBG_LEVEL_ALL) {
-		printk("%s, value (0x%08x) is out of range, stay previous flag (0x%08x)\n", __func__, flag, atomic_read(&WILC_DEBUG_LEVEL));
+		pr_info("%s, value (0x%08x) is out of range, stay previous flag (0x%08x)\n", __func__, flag, atomic_read(&WILC_DEBUG_LEVEL));
 		return -EINVAL;
 	}
 
 	atomic_set(&WILC_DEBUG_LEVEL, (int)flag);
 
 	if (flag == 0)
-		printk(KERN_INFO "Debug-level disabled\n");
+		pr_info("Debug-level disabled\n");
 	else
-		printk(KERN_INFO "Debug-level enabled\n");
+		pr_info("Debug-level enabled\n");
 
 	return count;
 }
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 10 lines · Elise Lennion

Fix checkpatch warning:

WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...

Replace printk(KERN_INFO...) by pr_info() for more uniform error reporting.

---
 drivers/staging/wilc1000/wilc_debugfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

You need to put below the --- line what changed in v2 of this patch.

thanks,

greg k-h

#2 lore raw
Quoted 5 lines · Greg KH

You need to put below the --- line what changed in v2 of this patch.

thanks,

greg k-h

In this one I only included the first pr_info() in the commit.

Sent another patch with the description of v2.

elise