Skip to contentSkip to conversation

staging: netlogic: fixed checkpatch.pl styling warnings

PATCH In review Ramon Fried 2 participants 2 messages Aug 30, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: netlogic: fixed checkpatch.pl styling warnings

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);

Quoted 1 line

From 27b58d9b1d39ab99bf6022b82ac9e602621b2822 Mon Sep 17 00:00:00 2001

From: Ramon Fried <[email protected]>
Date: Sat, 30 Aug 2014 22:26:11 +0300
Subject: [PATCH] staging: netlogic: fixed checkpatch.pl styling warnings

---
 drivers/staging/netlogic/xlr_net.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/netlogic/xlr_net.c +2 -3
index 9bf407d..28a42831 100644
@@ -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);
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 12 lines · Ramon Fried

This patch fixes the following checkpatch.pl warnings:

WARNING: Possible unnecessary 'out of memory' message #146: FILE: ./xlr_net.c:146:

(quoted diff) +2 -0
+	if (!skb) {
+		pr_err("SKB allocation failed\n");

WARNING: Missing a blank line after declarations
#1107: FILE: ./xlr_net.c:1107:

(quoted diff) +2 -0
+	struct xlr_net_priv *priv = platform_get_drvdata(pdev);
+	unregister_netdev(priv->ndev);
Quoted 6 lines
Quoted 1 line

From 27b58d9b1d39ab99bf6022b82ac9e602621b2822 Mon Sep 17 00:00:00 2001

From: Ramon Fried <[email protected]>
Date: Sat, 30 Aug 2014 22:26:11 +0300
Subject: [PATCH] staging: netlogic: fixed checkpatch.pl styling warnings

WHy did you not put the information above in the changelog area here?

And why send a patch as an attachment, I can't do much of anything with that :(

Also, please use the scripts/get_maintainer.pl tool to determine who and what mailing lists to cc: for a patch.

Please fix this up and resend.

thanks,

greg k-h