Skip to contentSkip to conversation

staging: sm750fb: Add log level to printk().

PATCH In review Elise-Lennion 2 participants 4 messages Oct 4, 2016 – Oct 5, 2016

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

PATCH 1/1 staging: sm750fb: Add log level to printk().

Fix checkpatch warning:

WARNING: printk() should include KERN_ facility level

KERN_ facility levels ensure that unecessary messages, in different steps of driver implemention and testing, don't saturate the log file.

When log level is not explicited it defaults to DEFAULT_MESSAGE_LOGLEVEL (usually "4"=KERN_WARNING). A module startup message usually isn't a WARNING.

---
 drivers/staging/sm750fb/ddk750_help.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/ddk750_help.c +1 -1
index 9637dd3..fc7e936 100644
@@ -11,7 +11,7 @@ void ddk750_set_mmio(void __iomem *addr, unsigned short devId, char revId)
 	devId750 = devId;
 	revId750 = revId;
 	if (revId == 0xfe)
-		printk("found sm750le\n");
+		printk(KERN_INFO "found sm750le\n");
 }
 
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 7 lines · Elise-Lennion

Fix checkpatch warning:

WARNING: printk() should include KERN_ facility level

KERN_ facility levels ensure that unecessary messages, in different steps of driver implemention and testing, don't saturate the log file.

When log level is not explicited it defaults to DEFAULT_MESSAGE_LOGLEVEL (usually "4"=KERN_WARNING). A module startup message usually isn't a WARNING.

When you made this change, I think checkpatch would then suggest you do something else?

Quoted 1 line

Is this your complete name? I wonder because of the hyphen.

julia

Quoted 27 lines
---
 drivers/staging/sm750fb/ddk750_help.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/ddk750_help.c +1 -2
index 9637dd3..fc7e936 100644
@@ -11,7 +11,7 @@ void ddk750_set_mmio(void __iomem *addr, unsigned short devId, char revId)
 	devId750 = devId;
 	revId750 = revId;
 	if (revId == 0xfe)
-		printk("found sm750le\n");
+		printk(KERN_INFO "found sm750le\n");
 }
 
 
--

2.7.4

--
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/20161004095344.GA3903%40lennorien.com.
For more options, visit https://groups.google.com/d/optout.

#2 lore raw
Quoted 6 lines · Julia Lawall
Quoted 2 lines · Elise-Lennion

Fix checkpatch warning:

Quoted 9 lines
Quoted 5 lines

WARNING: printk() should include KERN_ facility level

KERN_ facility levels ensure that unecessary messages, in different steps of driver implemention and testing, don't saturate the log file.

When log level is not explicited it defaults to DEFAULT_MESSAGE_LOGLEVEL (usually "4"=KERN_WARNING). A module startup message usually isn't a WARNING.

When you made this change, I think checkpatch would then suggest you do something else?

Yes, now I see it suggests to replace printk() with other options. Although I'm sure I executed checkpatch after making the changes and didn't see any new warnings.

Quoted 6 lines
Quoted 1 line

Is this your complete name? I wonder because of the hyphen.

julia

My complete name is Elise Lennion, without the hyphen. I'll fix this in future patches.

I sent a new patch to fix the mentioned issues. In this case should I create a completely new patch or send it as a [PATCH v2]? I chose the latter, even though its subject is different. Thank you.

Elise

v2: https://groups.google.com/forum/#!topic/outreachy-kernel/-YJbFK96SFI

#3 lore raw
Quoted 21 lines · Elise Lennion
Quoted 6 lines · Julia Lawall
Quoted 2 lines · Elise-Lennion

Fix checkpatch warning:

Quoted 9 lines
Quoted 5 lines

WARNING: printk() should include KERN_ facility level

KERN_ facility levels ensure that unecessary messages, in different steps of driver implemention and testing, don't saturate the log file.

When log level is not explicited it defaults to DEFAULT_MESSAGE_LOGLEVEL (usually "4"=KERN_WARNING). A module startup message usually isn't a WARNING.

When you made this change, I think checkpatch would then suggest you do something else?

Yes, now I see it suggests to replace printk() with other options. Although I'm sure I executed checkpatch after making the changes and didn't see any new warnings.

Quoted 2 lines
Quoted 1 line
Quoted 8 lines
Quoted 4 lines

Is this your complete name? I wonder because of the hyphen.

julia

My complete name is Elise Lennion, without the hyphen. I'll fix this in future patches.

I sent a new patch to fix the mentioned issues. In this case should I create a completely new patch or send it as a [PATCH v2]? I chose the latter, even though its subject is different. Thank you.

v2 seems fine.

julia

Quoted 12 lines

Elise

v2: https://groups.google.com/forum/#!topic/outreachy-kernel/-YJbFK96SFI

--
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/20161004231931.GB5862%40lennorien.com.
For more options, visit https://groups.google.com/d/optout.