staging: sm750fb: Replace printk with pr_debug
Subsystems (2)
PATCH 1/1 staging: sm750fb: Replace printk with pr_debug
Replace printk without loglevel with pr_debug. Issue found by checkpatch.
--- drivers/staging/sm750fb/ddk750_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/ddk750_display.c +1 -1
@@ -51,7 +51,7 @@ static void setDisplayControl(int ctrl,int dispState)POKE32 (PANEL_DISPLAY_CTRL , ulDisplayCtrlReg); }while ((PEEK32 (PANEL_DISPLAY_CTRL ) & ~ulReservedBits) != (ulDisplayCtrlReg & ~ulReservedBits)); -printk ("Set Panel Plane enbit:after tried %d times\n" ,cnt); +pr_debug ("Set Panel Plane enbit:after tried %d times\n" ,cnt); }else {
Signature · 1 line
1.7.10.4
Greg KH
maintainerQuoted 13 lines · Marianne Moeller Knudsen
Replace printk without loglevel with
pr_debug. Issue found by checkpatch.Signed-off-by Marianne Moeller Knudsen <[email protected]>--- drivers/staging/sm750fb/ddk750_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/sm750fb/ddk750_display.c +0
-0
drivers/staging/sm750fb/ddk750_display.c static void setDisplayControl(int ctrl,int dispState) · line 54
Quoted 5 lines
drivers/staging/sm750fb/ddk750_display.c +1
-1@@ -51,7 +51,7 @@ static void setDisplayControl(int ctrl,int dispState)POKE32 (PANEL_DISPLAY_CTRL , ulDisplayCtrlReg); }while ((PEEK32 (PANEL_DISPLAY_CTRL ) & ~ulReservedBits) != (ulDisplayCtrlReg & ~ulReservedBits)); -printk ("Set Panel Plane enbit:after tried %d times\n" ,cnt); +pr_debug ("Set Panel Plane enbit:after tried %d times\n" ,cnt);
It's a driver, it should use dev_debug() instead please.
thanks,
greg k-h
Quoted 9 lines · Greg KH
Quoted 8 lines · Marianne Moeller Knudsen
Replace printk without loglevel with
pr_debug. Issue found by checkpatch.Signed-off-by Marianne Moeller Knudsen <[email protected]>--- drivers/staging/sm750fb/ddk750_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 12 lines
drivers/staging/sm750fb/ddk750_display.c static void setDisplayControl(int ctrl,int dispState) · line 54
Quoted 10 lines
drivers/staging/sm750fb/ddk750_display.c +1
-1@@ -51,7 +51,7 @@ static void setDisplayControl(int ctrl,int dispState)POKE32 (PANEL_DISPLAY_CTRL , ulDisplayCtrlReg); }while ((PEEK32 (PANEL_DISPLAY_CTRL ) & ~ulReservedBits) != (ulDisplayCtrlReg & ~ulReservedBits)); -printk ("Set Panel Plane enbit:after tried %d times\n" ,cnt); +pr_debug ("Set Panel Plane enbit:after tried %d times\n" ,cnt);It's a driver, it should use
dev_debug()instead please.
The @@ line shows that the function only has integer arguments. Is it acceptable to add arguments just for debug messages?
julia
Quoted 12 lines
thanks,
greg k-h
Signature · 5 lines
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/20150323213038.GA26335%40kroah.com. For more options, visit https://groups.google.com/d/optout.
Greg KH
maintainerQuoted 26 lines · Julia Lawall
Quoted 9 lines · Greg KH
Quoted 8 lines · Marianne Moeller Knudsen
Replace printk without loglevel with
pr_debug. Issue found by checkpatch.Signed-off-by Marianne Moeller Knudsen <[email protected]>--- drivers/staging/sm750fb/ddk750_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 12 lines
drivers/staging/sm750fb/ddk750_display.c static void setDisplayControl(int ctrl,int dispState) · line 54
Quoted 10 lines
drivers/staging/sm750fb/ddk750_display.c +1
-1@@ -51,7 +51,7 @@ static void setDisplayControl(int ctrl,int dispState)POKE32 (PANEL_DISPLAY_CTRL , ulDisplayCtrlReg); }while ((PEEK32 (PANEL_DISPLAY_CTRL ) & ~ulReservedBits) != (ulDisplayCtrlReg & ~ulReservedBits)); -printk ("Set Panel Plane enbit:after tried %d times\n" ,cnt); +pr_debug ("Set Panel Plane enbit:after tried %d times\n" ,cnt);It's a driver, it should use
dev_debug()instead please.
Quoted 2 lines
The @@ line shows that the function only has integer arguments. Is it acceptable to add arguments just for debug messages?
Yes, it's talking to hardware, so we need to know the exact device that caused the message. Random messages like this don't help anyone out as it doesn't describe the device, the file, the driver, or much of anything else :(
thanks,
greg k-h
Quoted 30 lines · Greg KH
Quoted 26 lines · Julia Lawall
Quoted 9 lines · Greg KH
Quoted 8 lines · Marianne Moeller Knudsen
Replace printk without loglevel with
pr_debug. Issue found by checkpatch.Signed-off-by Marianne Moeller Knudsen <[email protected]>--- drivers/staging/sm750fb/ddk750_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 12 lines
drivers/staging/sm750fb/ddk750_display.c static void setDisplayControl(int ctrl,int dispState) · line 54
Quoted 10 lines
drivers/staging/sm750fb/ddk750_display.c +1
-1@@ -51,7 +51,7 @@ static void setDisplayControl(int ctrl,int dispState)POKE32 (PANEL_DISPLAY_CTRL , ulDisplayCtrlReg); }while ((PEEK32 (PANEL_DISPLAY_CTRL ) & ~ulReservedBits) != (ulDisplayCtrlReg & ~ulReservedBits)); -printk ("Set Panel Plane enbit:after tried %d times\n" ,cnt); +pr_debug ("Set Panel Plane enbit:after tried %d times\n" ,cnt);It's a driver, it should use
dev_debug()instead please.Quoted 2 lines
The @@ line shows that the function only has integer arguments. Is it acceptable to add arguments just for debug messages?
Quoted 8 lines
Yes, it's talking to hardware, so we need to know the exact device that caused the message. Random messages like this don't help anyone out as it doesn't describe the device, the file, the driver, or much of anything else :(
thanks,
greg k-h
I've tried to make some code changes in order to use dev_dbg instead by passing fb_info. Maybe I could get some comments/hints/omgwhathaveyoudone on it? and if so how should I post it?
Thank you.
Quoted 36 lines · Marianne Moeller Knudsen
Quoted 35 lines · Greg KH
Quoted 26 lines · Julia Lawall
Quoted 9 lines · Greg KH
Quoted 8 lines · Marianne Moeller Knudsen
Replace printk without loglevel with
pr_debug. Issue found by checkpatch.Signed-off-by Marianne Moeller Knudsen <[email protected]>--- drivers/staging/sm750fb/ddk750_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 12 lines
drivers/staging/sm750fb/ddk750_display.c static void setDisplayControl(int ctrl,int dispState) · line 54
Quoted 10 lines
drivers/staging/sm750fb/ddk750_display.c +1
-1@@ -51,7 +51,7 @@ static void setDisplayControl(int ctrl,int dispState)POKE32 (PANEL_DISPLAY_CTRL , ulDisplayCtrlReg); }while ((PEEK32 (PANEL_DISPLAY_CTRL ) & ~ulReservedBits) != (ulDisplayCtrlReg & ~ulReservedBits)); -printk ("Set Panel Plane enbit:after tried %d times\n" ,cnt); +pr_debug ("Set Panel Plane enbit:after tried %d times\n" ,cnt);It's a driver, it should use
dev_debug()instead please.Quoted 2 lines
The @@ line shows that the function only has integer arguments. Is it acceptable to add arguments just for debug messages?
Yes, it's talking to hardware, so we need to know the exact device that caused the message. Random messages like this don't help anyone out as it doesn't describe the device, the file, the driver, or much of anything else :(
Quoted 5 lines
Quoted 3 lines
thanks,
greg k-h
I've tried to make some code changes in order to use
dev_dbginstead by passingfb_info. Maybe I could get some comments/hints/omgwhathaveyoudone on it? and if so how should I post it?
Just post what you propose. If you have some doubts about what you have done, you can discuss them under the ---. That way ifthe strategy you have taken is actually fine, the patch can be accepted as is, and your comments will disappear.
julia