[OPW,kernel] Fix checkpatch.pl error to use pr_notice, pr_err, or netdev_err, netdev_notice or dev_err, dev_notice instead of printk Signed-off-by: swetha <swetha.kanagala@gmail.com>
diff mbox

Message ID 1394081857-9716-1-git-send-email-swetha.kanagala@gmail.com
State New, archived
Headers show

Commit Message

swetha.kanagala@gmail.com March 6, 2014, 4:57 a.m. UTC
From: swetha <swetha.kanagala@gmail.com>

---
 drivers/staging/wlan-ng/p80211netdev.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Pablo Neira Ayuso March 6, 2014, 11:16 a.m. UTC | #1
Looking at your email subject:

[OPW kernel] [PATCH] Fix checkpatch.pl error to use pr_notice,
 pr_err, or netdev_err, netdev_notice or dev_err, dev_notice instead of
 printk Signed-off-by: swetha <swetha.kanagala@gmail.com>

I think you forgot to add a title to the patch? I mean, the patch
description should look like:

        Patch title

        This is the description...

        Signed-off-by: Your name <email@email.com>

More comments below:

On Thu, Mar 06, 2014 at 10:27:37AM +0530, swetha.kanagala@gmail.com wrote:
> From: swetha <swetha.kanagala@gmail.com>
> 
> ---
>  drivers/staging/wlan-ng/p80211netdev.c |   10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c
> index 0039e08..3d69c37 100644
> --- a/drivers/staging/wlan-ng/p80211netdev.c
> +++ b/drivers/staging/wlan-ng/p80211netdev.c
> @@ -385,7 +385,7 @@ static int p80211knetdev_hard_start_xmit(struct sk_buff *skb,
>  		 */
>  		if (skb->protocol != ETH_P_80211_RAW) {
>  			netif_start_queue(wlandev->netdev);
> -			printk(KERN_NOTICE
> +			pr_notice(
>  			       "Tx attempt prior to association, frame dropped.\n");

This is going over the 80 chars per columns boundary, so the line
break doesn't make sense to me.

>  			wlandev->linux_stats.tx_dropped++;
>  			result = 0;
> @@ -685,7 +685,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
>  	 * change the netdev address
>  	 */
>  	if (result != 0 || resultcode->data != P80211ENUM_resultcode_success) {
> -		printk(KERN_ERR
> +		pr_err(
>  		       "Low-level driver failed dot11req_mibset(dot11MACAddress).\n");

I think you can put this in one single line:

                pr_err("Low-level driver failed dot11req_mibset(dot11MACAddress).\n");
Julia Lawall March 6, 2014, 4:38 p.m. UTC | #2
Maybe netdev functions could be used?

julia

On Thu, 6 Mar 2014, swetha.kanagala@gmail.com wrote:

> From: swetha <swetha.kanagala@gmail.com>
>
> ---
>  drivers/staging/wlan-ng/p80211netdev.c |   10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c
> index 0039e08..3d69c37 100644
> --- a/drivers/staging/wlan-ng/p80211netdev.c
> +++ b/drivers/staging/wlan-ng/p80211netdev.c
> @@ -385,7 +385,7 @@ static int p80211knetdev_hard_start_xmit(struct sk_buff *skb,
>  		 */
>  		if (skb->protocol != ETH_P_80211_RAW) {
>  			netif_start_queue(wlandev->netdev);
> -			printk(KERN_NOTICE
> +			pr_notice(
>  			       "Tx attempt prior to association, frame dropped.\n");
>  			wlandev->linux_stats.tx_dropped++;
>  			result = 0;
> @@ -685,7 +685,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
>  	 * change the netdev address
>  	 */
>  	if (result != 0 || resultcode->data != P80211ENUM_resultcode_success) {
> -		printk(KERN_ERR
> +		pr_err(
>  		       "Low-level driver failed dot11req_mibset(dot11MACAddress).\n");
>  		result = -EADDRNOTAVAIL;
>  	} else {
> @@ -765,7 +765,7 @@ int wlan_setup(wlandevice_t *wlandev, struct device *physdev)
>  	/* Allocate and initialize the wiphy struct */
>  	wiphy = wlan_create_wiphy(physdev, wlandev);
>  	if (wiphy == NULL) {
> -		printk(KERN_ERR "Failed to alloc wiphy.\n");
> +		pr_err("Failed to alloc wiphy.\n");
>  		return 1;
>  	}
>
> @@ -773,7 +773,7 @@ int wlan_setup(wlandevice_t *wlandev, struct device *physdev)
>  	netdev = alloc_netdev(sizeof(struct wireless_dev), "wlan%d",
>  				ether_setup);
>  	if (netdev == NULL) {
> -		printk(KERN_ERR "Failed to alloc netdev.\n");
> +		pr_err("Failed to alloc netdev.\n");
>  		wlan_free_wiphy(wiphy);
>  		result = 1;
>  	} else {
> @@ -1105,7 +1105,7 @@ static void p80211knetdev_tx_timeout(netdevice_t *netdev)
>  	if (wlandev->tx_timeout) {
>  		wlandev->tx_timeout(wlandev);
>  	} else {
> -		printk(KERN_WARNING "Implement tx_timeout for %s\n",
> +		pr_warn("Implement tx_timeout for %s\n",
>  		       wlandev->nsdname);
>  		netif_wake_queue(wlandev->netdev);
>  	}
> --
> 1.7.9.5
>
> --
> 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/groups/opt_out.
>
Sarah Sharp March 7, 2014, 12:24 a.m. UTC | #3
On Thu, Mar 06, 2014 at 10:27:37AM +0530, swetha.kanagala@gmail.com wrote:
> From: swetha <swetha.kanagala@gmail.com>

Hi Swetha,

You'll need to change the name in your .git/config or ~/.gitconfig file
to include your full name.  We can't accept patches that aren't signed
off by someone with their full name.

Once you edit that file, you can amend the authorship information on
this commit by running:

git commit --amend --author="Your Name <email@example.com>" -s

Please fix that (along with the other comments), and submit a revised
patch.

Thanks for sending this in, good luck with the next version!

Sarah Sharp

> 
> ---
>  drivers/staging/wlan-ng/p80211netdev.c |   10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c
> index 0039e08..3d69c37 100644
> --- a/drivers/staging/wlan-ng/p80211netdev.c
> +++ b/drivers/staging/wlan-ng/p80211netdev.c
> @@ -385,7 +385,7 @@ static int p80211knetdev_hard_start_xmit(struct sk_buff *skb,
>  		 */
>  		if (skb->protocol != ETH_P_80211_RAW) {
>  			netif_start_queue(wlandev->netdev);
> -			printk(KERN_NOTICE
> +			pr_notice(
>  			       "Tx attempt prior to association, frame dropped.\n");
>  			wlandev->linux_stats.tx_dropped++;
>  			result = 0;
> @@ -685,7 +685,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
>  	 * change the netdev address
>  	 */
>  	if (result != 0 || resultcode->data != P80211ENUM_resultcode_success) {
> -		printk(KERN_ERR
> +		pr_err(
>  		       "Low-level driver failed dot11req_mibset(dot11MACAddress).\n");
>  		result = -EADDRNOTAVAIL;
>  	} else {
> @@ -765,7 +765,7 @@ int wlan_setup(wlandevice_t *wlandev, struct device *physdev)
>  	/* Allocate and initialize the wiphy struct */
>  	wiphy = wlan_create_wiphy(physdev, wlandev);
>  	if (wiphy == NULL) {
> -		printk(KERN_ERR "Failed to alloc wiphy.\n");
> +		pr_err("Failed to alloc wiphy.\n");
>  		return 1;
>  	}
>  
> @@ -773,7 +773,7 @@ int wlan_setup(wlandevice_t *wlandev, struct device *physdev)
>  	netdev = alloc_netdev(sizeof(struct wireless_dev), "wlan%d",
>  				ether_setup);
>  	if (netdev == NULL) {
> -		printk(KERN_ERR "Failed to alloc netdev.\n");
> +		pr_err("Failed to alloc netdev.\n");
>  		wlan_free_wiphy(wiphy);
>  		result = 1;
>  	} else {
> @@ -1105,7 +1105,7 @@ static void p80211knetdev_tx_timeout(netdevice_t *netdev)
>  	if (wlandev->tx_timeout) {
>  		wlandev->tx_timeout(wlandev);
>  	} else {
> -		printk(KERN_WARNING "Implement tx_timeout for %s\n",
> +		pr_warn("Implement tx_timeout for %s\n",
>  		       wlandev->nsdname);
>  		netif_wake_queue(wlandev->netdev);
>  	}
> -- 
> 1.7.9.5
> 
> -- 
> 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/groups/opt_out.

Patch
diff mbox

diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c
index 0039e08..3d69c37 100644
--- a/drivers/staging/wlan-ng/p80211netdev.c
+++ b/drivers/staging/wlan-ng/p80211netdev.c
@@ -385,7 +385,7 @@  static int p80211knetdev_hard_start_xmit(struct sk_buff *skb,
 		 */
 		if (skb->protocol != ETH_P_80211_RAW) {
 			netif_start_queue(wlandev->netdev);
-			printk(KERN_NOTICE
+			pr_notice(
 			       "Tx attempt prior to association, frame dropped.\n");
 			wlandev->linux_stats.tx_dropped++;
 			result = 0;
@@ -685,7 +685,7 @@  static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
 	 * change the netdev address
 	 */
 	if (result != 0 || resultcode->data != P80211ENUM_resultcode_success) {
-		printk(KERN_ERR
+		pr_err(
 		       "Low-level driver failed dot11req_mibset(dot11MACAddress).\n");
 		result = -EADDRNOTAVAIL;
 	} else {
@@ -765,7 +765,7 @@  int wlan_setup(wlandevice_t *wlandev, struct device *physdev)
 	/* Allocate and initialize the wiphy struct */
 	wiphy = wlan_create_wiphy(physdev, wlandev);
 	if (wiphy == NULL) {
-		printk(KERN_ERR "Failed to alloc wiphy.\n");
+		pr_err("Failed to alloc wiphy.\n");
 		return 1;
 	}
 
@@ -773,7 +773,7 @@  int wlan_setup(wlandevice_t *wlandev, struct device *physdev)
 	netdev = alloc_netdev(sizeof(struct wireless_dev), "wlan%d",
 				ether_setup);
 	if (netdev == NULL) {
-		printk(KERN_ERR "Failed to alloc netdev.\n");
+		pr_err("Failed to alloc netdev.\n");
 		wlan_free_wiphy(wiphy);
 		result = 1;
 	} else {
@@ -1105,7 +1105,7 @@  static void p80211knetdev_tx_timeout(netdevice_t *netdev)
 	if (wlandev->tx_timeout) {
 		wlandev->tx_timeout(wlandev);
 	} else {
-		printk(KERN_WARNING "Implement tx_timeout for %s\n",
+		pr_warn("Implement tx_timeout for %s\n",
 		       wlandev->nsdname);
 		netif_wake_queue(wlandev->netdev);
 	}