public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: netlogic: fixed checkpatch.pl styling warnings
@ 2014-08-31  0:16 Ramon Fried
  2014-08-31  0:32 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 5+ messages in thread
From: Ramon Fried @ 2014-08-31  0:16 UTC (permalink / raw)
  To: ramon.fried
  Cc: Greg Kroah-Hartman, David S. Miller, Sarah Sharp, Daniel Borkmann,
	Alan Cox, Wilfried Klaebe, Mostyn Bramley-Moore, Toby Smith,
	Archana kumari, Jason Wang, Himangi Saraogi, Iulia Manda,
	open list:STAGING SUBSYSTEM, open list

This patch fixes the following checkpatch.pl warnings:

WARNING: Possible unnecessary 'out of memory' message
#146: FILE: ./xlr_net.c:146:
+       if (!skb) {
+               pr_err("SKB allocation failed\n");

WARNING: Missing a blank line after declarations
#1107: FILE: ./xlr_net.c:1107:
+       struct xlr_net_priv *priv = platform_get_drvdata(pdev);
+       unregister_netdev(priv->ndev);

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
---
 drivers/staging/netlogic/xlr_net.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c
index 9bf407d..28a42831 100644
--- a/drivers/staging/netlogic/xlr_net.c
+++ b/drivers/staging/netlogic/xlr_net.c
@@ -142,10 +142,8 @@ static inline struct sk_buff *xlr_alloc_skb(void)
 
 	/* skb->data is cache aligned */
 	skb = alloc_skb(XLR_RX_BUF_SIZE, GFP_ATOMIC);
-	if (!skb) {
-		pr_err("SKB allocation failed\n");
+	if (!skb)
 		return NULL;
-	}
 	mac_put_skb_back_ptr(skb);
 	return skb;
 }
@@ -1104,6 +1102,7 @@ err_gmac:
 static int xlr_net_remove(struct platform_device *pdev)
 {
 	struct xlr_net_priv *priv = platform_get_drvdata(pdev);
+
 	unregister_netdev(priv->ndev);
 	mdiobus_unregister(priv->mii_bus);
 	mdiobus_free(priv->mii_bus);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread
* Re: [PATCH] staging: netlogic: fixed checkpatch.pl styling warnings
@ 2014-08-31  7:24 Ramon Fried
  0 siblings, 0 replies; 5+ messages in thread
From: Ramon Fried @ 2014-08-31  7:24 UTC (permalink / raw)
  To: open list

Hi Greg
Thanks for your patience. this is the first time I doing it...
I created the patch against linux-next, I will do it again and send it.
Regarding CC's, this is the output of get_maintainer script, how do I
extract the relevant people out of its output ?
Warm regards,
Ramon.

On Sun, Aug 31, 2014 at 3:32 AM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Sun, Aug 31, 2014 at 03:16:48AM +0300, Ramon Fried wrote:
>> This patch fixes the following checkpatch.pl warnings:
>>
>> WARNING: Possible unnecessary 'out of memory' message
>> #146: FILE: ./xlr_net.c:146:
>> +       if (!skb) {
>> +               pr_err("SKB allocation failed\n");
>>
>> WARNING: Missing a blank line after declarations
>> #1107: FILE: ./xlr_net.c:1107:
>> +       struct xlr_net_priv *priv = platform_get_drvdata(pdev);
>> +       unregister_netdev(priv->ndev);
>>
>> Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
>
> This is two different things, and as such, should be sent in 2 different
> patches?
>
> Also, you sent this to a lot of people, did they all really need it?
>
>> ---
>>  drivers/staging/netlogic/xlr_net.c | 5 ++---
>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c
>> index 9bf407d..28a42831 100644
>> --- a/drivers/staging/netlogic/xlr_net.c
>> +++ b/drivers/staging/netlogic/xlr_net.c
>> @@ -142,10 +142,8 @@ static inline struct sk_buff *xlr_alloc_skb(void)
>>
>>       /* skb->data is cache aligned */
>>       skb = alloc_skb(XLR_RX_BUF_SIZE, GFP_ATOMIC);
>> -     if (!skb) {
>> -             pr_err("SKB allocation failed\n");
>> +     if (!skb)
>>               return NULL;
>> -     }
>>       mac_put_skb_back_ptr(skb);
>>       return skb;
>>  }
>> @@ -1104,6 +1102,7 @@ err_gmac:
>>  static int xlr_net_remove(struct platform_device *pdev)
>>  {
>>       struct xlr_net_priv *priv = platform_get_drvdata(pdev);
>> +
>>       unregister_netdev(priv->ndev);
>>       mdiobus_unregister(priv->mii_bus);
>>       mdiobus_free(priv->mii_bus);
>
> Finally, this patch doesn't apply at all to my tree, so even if I wanted
> to apply it, I couldn't.  Please refresh it against the staging-next
> branch of the staging.git tree on git.kernel.org, and if it is still
> relevant (hint, half of it isn't), then redo it and resend.
>
> thanks,
>
> greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH] staging: netlogic: fixed checkpatch.pl styling warnings
@ 2014-08-30 19:54 Ramon Fried
  2014-08-30 21:01 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Ramon Fried @ 2014-08-30 19:54 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 363 bytes --]

This patch fixes the following checkpatch.pl warnings:

WARNING: Possible unnecessary 'out of memory' message
#146: FILE: ./xlr_net.c:146:
+	if (!skb) {
+		pr_err("SKB allocation failed\n");

WARNING: Missing a blank line after declarations
#1107: FILE: ./xlr_net.c:1107:
+	struct xlr_net_priv *priv = platform_get_drvdata(pdev);
+	unregister_netdev(priv->ndev);

[-- Attachment #2: 0001-staging-netlogic-fixed-checkpatch.pl-styling-warning.patch --]
[-- Type: text/x-diff, Size: 1125 bytes --]

>From 27b58d9b1d39ab99bf6022b82ac9e602621b2822 Mon Sep 17 00:00:00 2001
From: Ramon Fried <ramon.fried@gmail.com>
Date: Sat, 30 Aug 2014 22:26:11 +0300
Subject: [PATCH] staging: netlogic: fixed checkpatch.pl styling warnings

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
---
 drivers/staging/netlogic/xlr_net.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c
index 9bf407d..28a42831 100644
--- a/drivers/staging/netlogic/xlr_net.c
+++ b/drivers/staging/netlogic/xlr_net.c
@@ -142,10 +142,8 @@ static inline struct sk_buff *xlr_alloc_skb(void)
 
 	/* skb->data is cache aligned */
 	skb = alloc_skb(XLR_RX_BUF_SIZE, GFP_ATOMIC);
-	if (!skb) {
-		pr_err("SKB allocation failed\n");
+	if (!skb)
 		return NULL;
-	}
 	mac_put_skb_back_ptr(skb);
 	return skb;
 }
@@ -1104,6 +1102,7 @@ err_gmac:
 static int xlr_net_remove(struct platform_device *pdev)
 {
 	struct xlr_net_priv *priv = platform_get_drvdata(pdev);
+
 	unregister_netdev(priv->ndev);
 	mdiobus_unregister(priv->mii_bus);
 	mdiobus_free(priv->mii_bus);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-31  7:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-31  0:16 [PATCH] staging: netlogic: fixed checkpatch.pl styling warnings Ramon Fried
2014-08-31  0:32 ` Greg Kroah-Hartman
  -- strict thread matches above, loose matches on Subject: below --
2014-08-31  7:24 Ramon Fried
2014-08-30 19:54 Ramon Fried
2014-08-30 21:01 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox