Thread (11 messages) 11 messages, 4 authors, 2012-10-04
STALE4991d

[PATCH] net: ethernet: clean out braces / old code (found via checkpatch)

From: Scott Lovenberg <hidden>
Date: 2012-10-02 16:16:34

On Tue, Oct 2, 2012 at 6:56 AM,  [off-list ref] wrote:
quoted hunk ↗ jump to hunk
From: Matthew Walster <redacted>

Remove an old commented out piece of code.
Remove an if(true) statement.
Remove a set of braces that weren't strictly necessary.

All found by running checkpatch.pl against the code.

Signed-off-by: Matthew Walster <redacted>
---
 net/ethernet/eth.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index 4efad53..a9f8531 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -178,11 +178,8 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
         *      seems to set IFF_PROMISC.
         */

-       else if (1 /*dev->flags&IFF_PROMISC */ ) {
-               if (unlikely(!ether_addr_equal_64bits(eth->h_dest,
-                                                     dev->dev_addr)))
-                       skb->pkt_type = PACKET_OTHERHOST;
-       }
+       else if (unlikely(!ether_addr_equal_64bits(eth->h_dest, dev->dev_addr)))
+               skb->pkt_type = PACKET_OTHERHOST;

        /*
         * Some variants of DSA tagging don't have an ethertype field
--
1.7.10.4
Looks good to me.

-- 
Peace and Blessings,
-Scott.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help