[OPW,kernel,v2] staging: silicom: fix checkpatch warnings regarding log statements
diff mbox

Message ID 20131106002246.GA17182@dev
State Awaiting Upstream
Headers show

Commit Message

C. Koppelt Nov. 6, 2013, 12:22 a.m. UTC
this patch replaces printk statements with pr_ statements

Signed-off-by: Christine Koppelt <opw.chk@gmail.com>
---
 drivers/staging/silicom/bpctl_mod.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

Comments

Waskiewicz Jr, Peter P Nov. 6, 2013, 12:25 a.m. UTC | #1
On Wed, 2013-11-06 at 01:22 +0100, Christine Koppelt wrote:
> this patch replaces printk statements with pr_ statements
> 
> Signed-off-by: Christine Koppelt <opw.chk@gmail.com>

Looks good, thanks.

Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>

> ---
>  drivers/staging/silicom/bpctl_mod.c | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c
> index 39dc92a..c95126e 100644
> --- a/drivers/staging/silicom/bpctl_mod.c
> +++ b/drivers/staging/silicom/bpctl_mod.c
> @@ -6611,8 +6611,7 @@ static int init_one(struct bpctl_dev *dev, struct bpmod_info *info, struct pci_d
>  
>  	if (!dev->bp_10g9) {
>  		if (is_bypass_fn(dev)) {
> -			printk(KERN_INFO "%s found, ",
> -			       dev->name);
> +			pr_info("%s found, ", dev->name);
>  			find_fw(dev);
>  		}
>  		dev->wdt_status = WDT_STATUS_UNKNOWN;
> @@ -6708,8 +6707,7 @@ static int __init bypass_init_module(void)
>  			if (dev->bp_10g9) {
>  				pbpctl_dev_c = get_status_port_fn(dev);
>  				if (is_bypass_fn(dev)) {
> -					printk(KERN_INFO "%s found, ",
> -					       dev->name);
> +					pr_info("%s found, ", dev->name);
>  					dev->bp_fw_ver = bypass_fw_ver(dev);
>  					printk("firmware version: 0x%x\n",
>  					       dev->bp_fw_ver);
> @@ -7124,9 +7122,8 @@ int bp_proc_create(void)
>  {
>  	bp_procfs_dir = proc_mkdir(BP_PROC_DIR, init_net.proc_net);
>  	if (bp_procfs_dir == (struct proc_dir_entry *)0) {
> -		printk(KERN_DEBUG
> -		       "Could not create procfs nicinfo directory %s\n",
> -		       BP_PROC_DIR);
> +		pr_debug("Could not create procfs nicinfo directory %s\n",
> +			BP_PROC_DIR);
>  		return -1;
>  	}
>  	return 0;
> -- 
> 1.8.4.rc3
Greg Kroah-Hartman Nov. 10, 2013, 7:47 p.m. UTC | #2
On Wed, Nov 06, 2013 at 01:22:46AM +0100, Christine Koppelt wrote:
> this patch replaces printk statements with pr_ statements
> 
> Signed-off-by: Christine Koppelt <opw.chk@gmail.com>
> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> ---
>  drivers/staging/silicom/bpctl_mod.c | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c
> index 39dc92a..c95126e 100644
> --- a/drivers/staging/silicom/bpctl_mod.c
> +++ b/drivers/staging/silicom/bpctl_mod.c
> @@ -6611,8 +6611,7 @@ static int init_one(struct bpctl_dev *dev, struct bpmod_info *info, struct pci_d
>  
>  	if (!dev->bp_10g9) {
>  		if (is_bypass_fn(dev)) {
> -			printk(KERN_INFO "%s found, ",
> -			       dev->name);
> +			pr_info("%s found, ", dev->name);

Drivers should always use the dev_* macros if at all possible, like the
checkpatch warning says to do.

Please use dev_info() here, and in the other locations.

PJ, please be more careful on the review...

thanks,

greg k-h
Waskiewicz Jr, Peter P Nov. 10, 2013, 7:53 p.m. UTC | #3
On Sun, 2013-11-10 at 11:47 -0800, Greg KH wrote:
> On Wed, Nov 06, 2013 at 01:22:46AM +0100, Christine Koppelt wrote:
> > this patch replaces printk statements with pr_ statements
> > 
> > Signed-off-by: Christine Koppelt <opw.chk@gmail.com>
> > Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> > ---
> >  drivers/staging/silicom/bpctl_mod.c | 11 ++++-------
> >  1 file changed, 4 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c
> > index 39dc92a..c95126e 100644
> > --- a/drivers/staging/silicom/bpctl_mod.c
> > +++ b/drivers/staging/silicom/bpctl_mod.c
> > @@ -6611,8 +6611,7 @@ static int init_one(struct bpctl_dev *dev, struct bpmod_info *info, struct pci_d
> >  
> >  	if (!dev->bp_10g9) {
> >  		if (is_bypass_fn(dev)) {
> > -			printk(KERN_INFO "%s found, ",
> > -			       dev->name);
> > +			pr_info("%s found, ", dev->name);
> 
> Drivers should always use the dev_* macros if at all possible, like the
> checkpatch warning says to do.
> 
> Please use dev_info() here, and in the other locations.
> 
> PJ, please be more careful on the review...

Sorry, that's my fault.  This is where I do wish the checkpatch output
was included as part of the commit message, but that's still no excuse
on my part.

/sadface

-PJ

Patch
diff mbox

diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c
index 39dc92a..c95126e 100644
--- a/drivers/staging/silicom/bpctl_mod.c
+++ b/drivers/staging/silicom/bpctl_mod.c
@@ -6611,8 +6611,7 @@  static int init_one(struct bpctl_dev *dev, struct bpmod_info *info, struct pci_d
 
 	if (!dev->bp_10g9) {
 		if (is_bypass_fn(dev)) {
-			printk(KERN_INFO "%s found, ",
-			       dev->name);
+			pr_info("%s found, ", dev->name);
 			find_fw(dev);
 		}
 		dev->wdt_status = WDT_STATUS_UNKNOWN;
@@ -6708,8 +6707,7 @@  static int __init bypass_init_module(void)
 			if (dev->bp_10g9) {
 				pbpctl_dev_c = get_status_port_fn(dev);
 				if (is_bypass_fn(dev)) {
-					printk(KERN_INFO "%s found, ",
-					       dev->name);
+					pr_info("%s found, ", dev->name);
 					dev->bp_fw_ver = bypass_fw_ver(dev);
 					printk("firmware version: 0x%x\n",
 					       dev->bp_fw_ver);
@@ -7124,9 +7122,8 @@  int bp_proc_create(void)
 {
 	bp_procfs_dir = proc_mkdir(BP_PROC_DIR, init_net.proc_net);
 	if (bp_procfs_dir == (struct proc_dir_entry *)0) {
-		printk(KERN_DEBUG
-		       "Could not create procfs nicinfo directory %s\n",
-		       BP_PROC_DIR);
+		pr_debug("Could not create procfs nicinfo directory %s\n",
+			BP_PROC_DIR);
 		return -1;
 	}
 	return 0;