Net: ethernet: eth: fix some code style issues
Subsystems (2)
PATCH 1/1 Net: ethernet: eth: fix some code style issues
From: Chihau Chau <[email protected]>
This fixes to include <linux/uaccess.h> instead <asm/uaccess.h> and some code style issues like space before close parenthesis and space before tabs.
Signed-off-by Chihau Chau <[email protected]>
--- net/ethernet/eth.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
net/ethernet/eth.c +4 -3
@@ -58,7 +58,7 @@#include <net/ipv6.h> #include <net/ip.h> #include <net/dsa.h> -#include <asm/uaccess.h> +#include <linux/uaccess.h> #include <asm/system.h> __setup ("ether=" , netdev_boot_setup);
@@ -180,7 +180,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 */ ) { +/*dev->flags&IFF_PROMISC */ + else if (1) {if (unlikely (compare_ether_addr_64bits (eth->h_dest, dev->dev_addr))) skb->pkt_type =PACKET_OTHERHOST ; }
@@ -338,7 +339,7 @@ void ether_setup(struct net_device *dev) { dev->header_ops = ð_header_ops; dev->type =ARPHRD_ETHER ; - dev->hard_header_len =ETH_HLEN ; + dev->hard_header_len =ETH_HLEN ; dev->mtu =ETH_DATA_LEN ; dev->addr_len =ETH_ALEN ; dev->tx_queue_len =1000 ;/* Ethernet wants good queues */
Signature · 1 line
1.5.6.3
David Miller
maintainerFrom: Chihau Chau <[email protected]>
Date: Wed, 14 Jul 2010 16:22:17 -0400
net/ethernet/eth.c __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev) · line 184
Quoted 7 lines
net/ethernet/eth.c +2
-1@@ -180,7 +180,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 */ ) { +/*dev->flags&IFF_PROMISC */ + else if (1) {
This makes the code look worse, not better.
If the commented test is in the parenthesis, it is unambiguous which piece of code the suggested test is meant for.