netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Net: ethernet: eth: fix some code style issues
@ 2010-07-14 20:22 Chihau Chau
  2010-07-15  1:26 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Chihau Chau @ 2010-07-14 20:22 UTC (permalink / raw)
  To: davem; +Cc: eric.dumazet, opurdila, netdev, linux-devel, mitov, Chihau Chau

From: Chihau Chau <chihau@gmail.com>

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 <chihau@gmail.com>
---
 net/ethernet/eth.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index 61ec032..25ccce0 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -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		= &eth_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 */
-- 
1.5.6.3


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

* Re: [PATCH] Net: ethernet: eth: fix some code style issues
  2010-07-14 20:22 [PATCH] Net: ethernet: eth: fix some code style issues Chihau Chau
@ 2010-07-15  1:26 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-07-15  1:26 UTC (permalink / raw)
  To: chihau; +Cc: eric.dumazet, opurdila, netdev, linux-devel, mitov

From: Chihau Chau <chihau@gmail.com>
Date: Wed, 14 Jul 2010 16:22:17 -0400

> @@ -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.

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

end of thread, other threads:[~2010-07-15  1:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-14 20:22 [PATCH] Net: ethernet: eth: fix some code style issues Chihau Chau
2010-07-15  1:26 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).