Skip to contentSkip to conversation

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

PATCH Superseded Elise Lennion 3 participants 4 messages Oct 5, 2016 – Oct 9, 2016

Subsystems (2)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 staging: sm750fb: Replace printk() with pr_info().

Fix checkpatch warning:

WARNING: printk() should include KERN_ facility level

New checkpatch warning appears after including KERN_ facility level.

Fix checkpatch warning:

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

---

v2: Fixed new checkpatch warning noted by Julia Lawall <[email protected]> Reworked to use pr_info() instead of printk()

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

Fix checkpatch warning:

WARNING: printk() should include KERN_ facility level

New checkpatch warning appears after including KERN_ facility level.

Fix checkpatch warning:

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

---

v2: Fixed new checkpatch warning noted by Julia Lawall <[email protected]> Reworked to use pr_info() instead of printk()

 drivers/staging/sm750fb/ddk750_help.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/sm750fb/ddk750_help.c +0 -0
index 9637dd3..475a943 100644

drivers/staging/sm750fb/ddk750_help.c void ddk750_set_mmio(void __iomem *addr, unsigned short devId, char revId) · line 17

Quoted 8 lines
drivers/staging/sm750fb/ddk750_help.c +1 -3
@@ -11,7 +11,5 @@ void ddk750_set_mmio(void __iomem *addr, unsigned short devId, char revId)
 	devId750 = devId;
 	revId750 = revId;
 	if (revId == 0xfe)
-		printk("found sm750le\n");
+		pr_info("found sm750le\n");
 }
-
-

Why are you deleting these extra lines?

And why can't you use dev_info() here instead of pr_info()?

thanks,

greg k-h

#2 lore raw
Quoted 20 lines · Greg KH
Quoted 19 lines · Elise Lennion

Fix checkpatch warning:

WARNING: printk() should include KERN_ facility level

New checkpatch warning appears after including KERN_ facility level.

Fix checkpatch warning:

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

---

v2: Fixed new checkpatch warning noted by Julia Lawall <[email protected]> Reworked to use pr_info() instead of printk()

 drivers/staging/sm750fb/ddk750_help.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Quoted 16 lines

drivers/staging/sm750fb/ddk750_help.c void ddk750_set_mmio(void __iomem *addr, unsigned short devId, char revId) · line 17

Quoted 13 lines
drivers/staging/sm750fb/ddk750_help.c +1 -3
index 9637dd3..475a943 100644
@@ -11,7 +11,5 @@ void ddk750_set_mmio(void __iomem *addr, unsigned short devId, char revId)
 	devId750 = devId;
 	revId750 = revId;
 	if (revId == 0xfe)
-		printk("found sm750le\n");
+		pr_info("found sm750le\n");
 }
-
-

Why are you deleting these extra lines?

I was fixing a checkpatch CHECK and forgot to put it in a different commit, sorry.

Quoted 5 lines

And why can't you use dev_info() here instead of pr_info()?

thanks,

greg k-h

I didn't use dev_info() because I didn't find a reference to a device struct.

I searched about how to use dev_* and all examples I found passed a pointer to a device struct in the function call.

In this case, without the pointer, how can I find the device to pass to dev_info()?

thank you.

elise

#3 lore raw
Quoted 44 lines · Elise Lennion
Quoted 20 lines · Greg KH
Quoted 19 lines · Elise Lennion

Fix checkpatch warning:

WARNING: printk() should include KERN_ facility level

New checkpatch warning appears after including KERN_ facility level.

Fix checkpatch warning:

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

---

v2: Fixed new checkpatch warning noted by Julia Lawall <[email protected]> Reworked to use pr_info() instead of printk()

 drivers/staging/sm750fb/ddk750_help.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Quoted 16 lines

drivers/staging/sm750fb/ddk750_help.c void ddk750_set_mmio(void __iomem *addr, unsigned short devId, char revId) · line 17

Quoted 13 lines
drivers/staging/sm750fb/ddk750_help.c +1 -3
index 9637dd3..475a943 100644
@@ -11,7 +11,5 @@ void ddk750_set_mmio(void __iomem *addr, unsigned short devId, char revId)
 	devId750 = devId;
 	revId750 = revId;
 	if (revId == 0xfe)
-		printk("found sm750le\n");
+		pr_info("found sm750le\n");
 }
-
-

Why are you deleting these extra lines?

I was fixing a checkpatch CHECK and forgot to put it in a different commit, sorry.

Quoted 4 lines

And why can't you use dev_info() here instead of pr_info()?

thanks,

Quoted 7 lines
Quoted 1 line

greg k-h

I didn't use dev_info() because I didn't find a reference to a device struct.

I searched about how to use dev_* and all examples I found passed a pointer to a device struct in the function call.

In this case, without the pointer, how can I find the device to pass to dev_info()?

Maybe the information is available in a function that calls this one, and you can add an extra parameter?

julia

Quoted 12 lines

thank you.

elise

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