diff mbox

[OPW,kernel] Staging:wlan-ng Fix checkpath.pl error prefer pr_info to printk

Message ID 20140313040730.GA1674@gmail.com
State New, archived
Headers show

Commit Message

Tugce Sirin March 13, 2014, 4:07 a.m. UTC
This patch fixes checkpath.pl error prefer pr_into to printk(KERN_INFO)

Signed-off-by: Tugce Sirin <ztugcesirin@gmail.com>
---
 drivers/staging/wlan-ng/prism2sta.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

Comments

Nick Kossifidis March 13, 2014, noon UTC | #1
2014-03-13 4:07 GMT+00:00 Tugce Sirin <ztugcesirin@gmail.com>:
> This patch fixes checkpath.pl error prefer pr_into to printk(KERN_INFO)
>
> Signed-off-by: Tugce Sirin <ztugcesirin@gmail.com>

Hello Tugce :-)

What editor did you use for the patch ? It puts DOS line endings.

ERROR: DOS line endings
#88: FILE: drivers/staging/wlan-ng/prism2sta.c:1227:
+^I^Ipr_info("linkstatus=NOTCONNECTED (unhandled)\n");^M$
Nick Kossifidis March 13, 2014, 12:22 p.m. UTC | #2
2014-03-13 12:00 GMT+00:00 Nick Kossifidis <mickflemm@gmail.com>:
> 2014-03-13 4:07 GMT+00:00 Tugce Sirin <ztugcesirin@gmail.com>:
>> This patch fixes checkpath.pl error prefer pr_into to printk(KERN_INFO)
>>
>> Signed-off-by: Tugce Sirin <ztugcesirin@gmail.com>
>
> Hello Tugce :-)
>
> What editor did you use for the patch ? It puts DOS line endings.
>
> ERROR: DOS line endings
> #88: FILE: drivers/staging/wlan-ng/prism2sta.c:1227:
> +^I^Ipr_info("linkstatus=NOTCONNECTED (unhandled)\n");^M$
>

Hmm, it seems it's a bug on my side, please ignore the above...

Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Julia Lawall March 13, 2014, 2:54 p.m. UTC | #3
> diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c
> index 386cfdd..ebe1b8a 100644
> --- a/drivers/staging/wlan-ng/prism2sta.c
> +++ b/drivers/staging/wlan-ng/prism2sta.c
> @@ -1224,7 +1224,7 @@ void prism2sta_processing_defer(struct work_struct *data)
>  		 */
>  		netif_carrier_off(wlandev->netdev);
>
> -		printk(KERN_INFO "linkstatus=NOTCONNECTED (unhandled)\n");
> +		pr_info("linkstatus=NOTCONNECTED (unhandled)\n");

There is a wlandevice_t structure available.  It should be possible to use
a netdev function.

julia

>  		break;
>
>  	case HFA384x_LINK_CONNECTED:
> @@ -1251,7 +1251,7 @@ void prism2sta_processing_defer(struct work_struct *data)
>  		if (wlandev->netdev->type == ARPHRD_ETHER) {
>  			u16 portstatus;
>
> -			printk(KERN_INFO "linkstatus=CONNECTED\n");
> +			pr_info("linkstatus=CONNECTED\n");
>
>  			/* For non-usb devices, we can use the sync versions */
>  			/* Collect the BSSID, and set state to allow tx */
> @@ -1313,8 +1313,7 @@ void prism2sta_processing_defer(struct work_struct *data)
>  		 * Block Transmits, Ignore receives of data frames
>  		 */
>  		if (wlandev->netdev->type == ARPHRD_ETHER)
> -			printk(KERN_INFO
> -			       "linkstatus=DISCONNECTED (unhandled)\n");
> +			pr_info("linkstatus=DISCONNECTED (unhandled)\n");
>  		wlandev->macmode = WLAN_MACMODE_NONE;
>
>  		netif_carrier_off(wlandev->netdev);
> @@ -1339,7 +1338,7 @@ void prism2sta_processing_defer(struct work_struct *data)
>  		 * Indicate Reassociation
>  		 * Enable Transmits, Receives and pass up data frames
>  		 */
> -		printk(KERN_INFO "linkstatus=AP_CHANGE\n");
> +		pr_info("linkstatus=AP_CHANGE\n");
>
>  		result = hfa384x_drvr_getconfig(hw,
>  						HFA384x_RID_CURRENTBSSID,
> @@ -1381,7 +1380,7 @@ void prism2sta_processing_defer(struct work_struct *data)
>  		 * Response:
>  		 * Block Transmits, Ignore receives of data frames
>  		 */
> -		printk(KERN_INFO "linkstatus=AP_OUTOFRANGE (unhandled)\n");
> +		pr_info("linkstatus=AP_OUTOFRANGE (unhandled)\n");
>
>  		netif_carrier_off(wlandev->netdev);
>
> @@ -1394,7 +1393,7 @@ void prism2sta_processing_defer(struct work_struct *data)
>  		 * Response:
>  		 * Enable Transmits, Receives and pass up data frames
>  		 */
> -		printk(KERN_INFO "linkstatus=AP_INRANGE\n");
> +		pr_info("linkstatus=AP_INRANGE\n");
>
>  		hw->link_status = HFA384x_LINK_CONNECTED;
>  		netif_carrier_on(wlandev->netdev);
> @@ -1418,10 +1417,9 @@ void prism2sta_processing_defer(struct work_struct *data)
>  					       HFA384x_RID_JOINREQUEST,
>  					       &joinreq,
>  					       HFA384x_RID_JOINREQUEST_LEN);
> -			printk(KERN_INFO
> -			       "linkstatus=ASSOCFAIL (re-submitting join)\n");
> +			pr_info("linkstatus=ASSOCFAIL (re-submitting join)\n");
>  		} else {
> -			printk(KERN_INFO "linkstatus=ASSOCFAIL (unhandled)\n");
> +			pr_info("linkstatus=ASSOCFAIL (unhandled)\n");
>  		}
>
>  		netif_carrier_off(wlandev->netdev);
> --
> 1.8.3.2
>
> --
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
diff mbox

Patch

diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c
index 386cfdd..ebe1b8a 100644
--- a/drivers/staging/wlan-ng/prism2sta.c
+++ b/drivers/staging/wlan-ng/prism2sta.c
@@ -1224,7 +1224,7 @@  void prism2sta_processing_defer(struct work_struct *data)
 		 */
 		netif_carrier_off(wlandev->netdev);
 
-		printk(KERN_INFO "linkstatus=NOTCONNECTED (unhandled)\n");
+		pr_info("linkstatus=NOTCONNECTED (unhandled)\n");
 		break;
 
 	case HFA384x_LINK_CONNECTED:
@@ -1251,7 +1251,7 @@  void prism2sta_processing_defer(struct work_struct *data)
 		if (wlandev->netdev->type == ARPHRD_ETHER) {
 			u16 portstatus;
 
-			printk(KERN_INFO "linkstatus=CONNECTED\n");
+			pr_info("linkstatus=CONNECTED\n");
 
 			/* For non-usb devices, we can use the sync versions */
 			/* Collect the BSSID, and set state to allow tx */
@@ -1313,8 +1313,7 @@  void prism2sta_processing_defer(struct work_struct *data)
 		 * Block Transmits, Ignore receives of data frames
 		 */
 		if (wlandev->netdev->type == ARPHRD_ETHER)
-			printk(KERN_INFO
-			       "linkstatus=DISCONNECTED (unhandled)\n");
+			pr_info("linkstatus=DISCONNECTED (unhandled)\n");
 		wlandev->macmode = WLAN_MACMODE_NONE;
 
 		netif_carrier_off(wlandev->netdev);
@@ -1339,7 +1338,7 @@  void prism2sta_processing_defer(struct work_struct *data)
 		 * Indicate Reassociation
 		 * Enable Transmits, Receives and pass up data frames
 		 */
-		printk(KERN_INFO "linkstatus=AP_CHANGE\n");
+		pr_info("linkstatus=AP_CHANGE\n");
 
 		result = hfa384x_drvr_getconfig(hw,
 						HFA384x_RID_CURRENTBSSID,
@@ -1381,7 +1380,7 @@  void prism2sta_processing_defer(struct work_struct *data)
 		 * Response:
 		 * Block Transmits, Ignore receives of data frames
 		 */
-		printk(KERN_INFO "linkstatus=AP_OUTOFRANGE (unhandled)\n");
+		pr_info("linkstatus=AP_OUTOFRANGE (unhandled)\n");
 
 		netif_carrier_off(wlandev->netdev);
 
@@ -1394,7 +1393,7 @@  void prism2sta_processing_defer(struct work_struct *data)
 		 * Response:
 		 * Enable Transmits, Receives and pass up data frames
 		 */
-		printk(KERN_INFO "linkstatus=AP_INRANGE\n");
+		pr_info("linkstatus=AP_INRANGE\n");
 
 		hw->link_status = HFA384x_LINK_CONNECTED;
 		netif_carrier_on(wlandev->netdev);
@@ -1418,10 +1417,9 @@  void prism2sta_processing_defer(struct work_struct *data)
 					       HFA384x_RID_JOINREQUEST,
 					       &joinreq,
 					       HFA384x_RID_JOINREQUEST_LEN);
-			printk(KERN_INFO
-			       "linkstatus=ASSOCFAIL (re-submitting join)\n");
+			pr_info("linkstatus=ASSOCFAIL (re-submitting join)\n");
 		} else {
-			printk(KERN_INFO "linkstatus=ASSOCFAIL (unhandled)\n");
+			pr_info("linkstatus=ASSOCFAIL (unhandled)\n");
 		}
 
 		netif_carrier_off(wlandev->netdev);