mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Darya Litvintseva <litv.daria@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: alex.mikhalevich@gmail.com, litv.daria@gmail.com,
	"David S. Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] net: fix braces and comments codestyle
Date: Tue, 11 Dec 2018 02:11:39 +0300	[thread overview]
Message-ID: <20181210231140.5280-1-litv.daria@gmail.com> (raw)

Signed-off-by: Darya Litvintseva <litv.daria@gmail.com>
---
 net/ethernet/eth.c | 23 ++++++++---------------
 1 file changed, 8 insertions(+), 15 deletions(-)

diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index fd8faa0dfa61..3b430e245d58 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -90,9 +90,7 @@ int eth_header(struct sk_buff *skb, struct net_device *dev,
 	else
 		eth->h_proto = htons(len);
 
-	/*
-	 *      Set the source hardware address.
-	 */
+	/* Set the source hardware address.*/
 
 	if (!saddr)
 		saddr = dev->dev_addr;
@@ -103,9 +101,7 @@ int eth_header(struct sk_buff *skb, struct net_device *dev,
 		return ETH_HLEN;
 	}
 
-	/*
-	 *      Anyway, the loopback-device should never use this function...
-	 */
+	/* Anyway, the loopback-device should never use this function... */
 
 	if (dev->flags & (IFF_LOOPBACK | IFF_NOARP)) {
 		eth_zero_addr(eth->h_dest);
@@ -170,13 +166,11 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
 			skb->pkt_type = PACKET_BROADCAST;
 		else
 			skb->pkt_type = PACKET_MULTICAST;
-	}
-	else if (unlikely(!ether_addr_equal_64bits(eth->h_dest,
+	} 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
+	/* Some variants of DSA tagging don't have an ethertype field
 	 * at all, so we check here whether one of those tagging
 	 * variants has been configured on the receiving interface,
 	 * and if so, set skb->protocol without looking at the packet.
@@ -187,8 +181,7 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
 	if (likely(eth_proto_is_802_3(eth->h_proto)))
 		return eth->h_proto;
 
-	/*
-	 *      This is a magic hack to spot IPX packets. Older Novell breaks
+	/*      This is a magic hack to spot IPX packets. Older Novell breaks
 	 *      the protocol design and runs IPX over 802.3 without an 802.2 LLC
 	 *      layer. We look for FFFF which isn't a used 802.2 SSAP/DSAP. This
 	 *      won't work for fault tolerant netware but does for the rest.
@@ -197,8 +190,7 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
 	if (sap && *sap == 0xFFFF)
 		return htons(ETH_P_802_3);
 
-	/*
-	 *      Real 802.2 LLC
+	/* Real 802.2 LLC
 	 */
 	return htons(ETH_P_802_2);
 }
@@ -212,6 +204,7 @@ EXPORT_SYMBOL(eth_type_trans);
 int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr)
 {
 	const struct ethhdr *eth = eth_hdr(skb);
+
 	memcpy(haddr, eth->h_source, ETH_ALEN);
 	return ETH_ALEN;
 }
@@ -355,7 +348,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->min_header_len	= ETH_HLEN;
 	dev->mtu		= ETH_DATA_LEN;
 	dev->min_mtu		= ETH_MIN_MTU;
-- 
2.19.1


             reply	other threads:[~2018-12-10 23:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-10 23:11 Darya Litvintseva [this message]
2018-12-10 23:23 ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181210231140.5280-1-litv.daria@gmail.com \
    --to=litv.daria@gmail.com \
    --cc=alex.mikhalevich@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®