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

Message ID 20131105231210.GA14668@dev
State Changes Requested
Headers show

Commit Message

C. Koppelt Nov. 5, 2013, 11:12 p.m. UTC
this patch replaces printk statements with netdev_ or pr_ statements

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

Comments

Waskiewicz Jr, Peter P Nov. 5, 2013, 11:16 p.m. UTC | #1
On Wed, 2013-11-06 at 00:12 +0100, Christine Koppelt wrote:
> this patch replaces printk statements with netdev_ or pr_ statements
> 
> Signed-off-by: Christine Koppelt <opw.chk@gmail.com>
> ---
>  drivers/staging/silicom/bpctl_mod.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c
> index 39dc92a..1d4dccb 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);
> +			netdev_info(dev, "%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);
> +					netdev_info(dev, "%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,7 @@ 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);

Did you re-run checkpatch.pl after you made this change?  It may
complain about the length of this line (BP_PROC_DIR should probably go
on the next line).

-PJ

>  		return -1;
>  	}
>  	return 0;
> -- 
> 1.8.4.rc3
>

Patch
diff mbox

diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c
index 39dc92a..1d4dccb 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);
+			netdev_info(dev, "%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);
+					netdev_info(dev, "%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,7 @@  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;