Skip to contentSkip to conversation

staging: speakup: fix printk KERN_LEVEL facility level warning

PATCH In review Jules Irenge 3 participants 3 messages Mar 17, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: speakup: fix printk KERN_LEVEL facility level warning

Replace printk with pr_debug to solve checkpatch.pl warning:
" WARNING: printk() should include KERN_<LEVEL> facility level"

---
 drivers/staging/speakup/kobjects.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/speakup/kobjects.c +1 -1
index 11c704b27c3c..2eb5af3debb3 100644
@@ -99,7 +99,7 @@ static void report_char_chartab_status(int reset, int received, int used,
 			snprintf(buf + (len - 1), sizeof(buf) - (len - 1),
 				 " with %d reject%s\n",
 				 rejected, rejected > 1 ? "s" : "");
-		printk(buf);
+		pr_debug(buf);
 	}
 }
 
Signature · 1 line
2.20.1
#1 lore raw
Quoted 2 lines · Jules Irenge

Replace printk with pr_debug to solve checkpatch.pl warning:
" WARNING: printk() should include KERN_<LEVEL> facility level"

Why did you choose pr_debug?

julia

Quoted 29 lines
---
 drivers/staging/speakup/kobjects.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/speakup/kobjects.c +1 -2
index 11c704b27c3c..2eb5af3debb3 100644
@@ -99,7 +99,7 @@ static void report_char_chartab_status(int reset, int received, int used,
 			snprintf(buf + (len - 1), sizeof(buf) - (len - 1),
 				 " with %d reject%s\n",
 				 rejected, rejected > 1 ? "s" : "");
-		printk(buf);
+		pr_debug(buf);
 	}
 }
 
--

2.20.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190317031236.9361-1-jbi.octave%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

maintainer
#2 lore raw
In reply to Jules Irenge
Quoted 13 lines · Jules Irenge

Replace printk with pr_debug to solve checkpatch.pl warning:
" WARNING: printk() should include KERN_<LEVEL> facility level"

---
 drivers/staging/speakup/kobjects.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/speakup/kobjects.c +0 -0
index 11c704b27c3c..2eb5af3debb3 100644

drivers/staging/speakup/kobjects.c static void report_char_chartab_status(int reset, int received, int used, · line 102

Quoted 5 lines
drivers/staging/speakup/kobjects.c +1 -1
@@ -99,7 +99,7 @@ static void report_char_chartab_status(int reset, int received, int used,
 			snprintf(buf + (len - 1), sizeof(buf) - (len - 1),
 				 " with %d reject%s\n",
 				 rejected, rejected > 1 ? "s" : "");
-		printk(buf);
+		pr_debug(buf);

This is not correct, look at the other messages in this function for why this is the case.

thanks,

greg k-h