staging: sm750fb: Replace printk() with pr_info().
Subsystems (2)
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
@@ -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
Greg KH
maintainerQuoted 24 lines · Elise Lennion
Fix checkpatch warning:
WARNING:
printk()should includeKERN_facility levelNew 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 ...
Signed-off-by Elise Lennion <[email protected]>---
v2: Fixed new checkpatch warning noted by Julia Lawall <[email protected]> Reworked to use
pr_info()instead ofprintk()drivers/staging/sm750fb/ddk750_help.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/staging/sm750fb/ddk750_help.c +0
-0
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
Quoted 20 lines · Greg KH
Quoted 19 lines · Elise Lennion
Fix checkpatch warning:
WARNING:
printk()should includeKERN_facility levelNew 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 ...
Signed-off-by Elise Lennion <[email protected]>---
v2: Fixed new checkpatch warning noted by Julia Lawall <[email protected]> Reworked to use
pr_info()instead ofprintk()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@@ -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 ofpr_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
Quoted 44 lines · Elise Lennion
Quoted 20 lines · Greg KH
Quoted 19 lines · Elise Lennion
Fix checkpatch warning:
WARNING:
printk()should includeKERN_facility levelNew 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 ...
Signed-off-by Elise Lennion <[email protected]>---
v2: Fixed new checkpatch warning noted by Julia Lawall <[email protected]> Reworked to use
pr_info()instead ofprintk()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@@ -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 ofpr_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.