staging: netlogic: fixed checkpatch.pl styling warnings
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);
--- drivers/staging/netlogic/xlr_net.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/netlogic/xlr_net.c +2 -3
@@ -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
Greg Kroah-Hartman
maintainerQuoted 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 1 line
Signed-off-by Ramon Fried <[email protected]>
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?
Quoted 21 lines
--- drivers/staging/netlogic/xlr_net.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/staging/netlogic/xlr_net.c +1
-3@@ -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; }
drivers/staging/netlogic/xlr_net.c err_gmac: · line 1108
Quoted 7 lines
drivers/staging/netlogic/xlr_net.c +1
-0@@ -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