diff options
author | Ian Morris <ipm@chirality.org.uk> | 2014-08-24 16:53:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-25 01:37:52 -0400 |
commit | 67ba4152e8b77eada6a9c64e3c2c84d6112794fc (patch) | |
tree | 833bd7925ed3b69ef65f759c3f806cdaa8643d00 /net/ipv6/ndisc.c | |
parent | a9b0b2faa8ed299ca617a317e2abb9ea1bf0e733 (diff) |
ipv6: White-space cleansing : Line Layouts
This patch makes no changes to the logic of the code but simply addresses
coding style issues as detected by checkpatch.
Both objdump and diff -w show no differences.
A number of items are addressed in this patch:
* Multiple spaces converted to tabs
* Spaces before tabs removed.
* Spaces in pointer typing cleansed (char *)foo etc.
* Remove space after sizeof
* Ensure spacing around comparators such as if statements.
Signed-off-by: Ian Morris <ipm@chirality.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r-- | net/ipv6/ndisc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 339078f95d1b..995a82945994 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -175,7 +175,7 @@ static struct nd_opt_hdr *ndisc_next_option(struct nd_opt_hdr *cur, | |||
175 | type = cur->nd_opt_type; | 175 | type = cur->nd_opt_type; |
176 | do { | 176 | do { |
177 | cur = ((void *)cur) + (cur->nd_opt_len << 3); | 177 | cur = ((void *)cur) + (cur->nd_opt_len << 3); |
178 | } while(cur < end && cur->nd_opt_type != type); | 178 | } while (cur < end && cur->nd_opt_type != type); |
179 | return cur <= end && cur->nd_opt_type == type ? cur : NULL; | 179 | return cur <= end && cur->nd_opt_type == type ? cur : NULL; |
180 | } | 180 | } |
181 | 181 | ||
@@ -192,7 +192,7 @@ static struct nd_opt_hdr *ndisc_next_useropt(struct nd_opt_hdr *cur, | |||
192 | return NULL; | 192 | return NULL; |
193 | do { | 193 | do { |
194 | cur = ((void *)cur) + (cur->nd_opt_len << 3); | 194 | cur = ((void *)cur) + (cur->nd_opt_len << 3); |
195 | } while(cur < end && !ndisc_is_useropt(cur)); | 195 | } while (cur < end && !ndisc_is_useropt(cur)); |
196 | return cur <= end && ndisc_is_useropt(cur) ? cur : NULL; | 196 | return cur <= end && ndisc_is_useropt(cur) ? cur : NULL; |
197 | } | 197 | } |
198 | 198 | ||
@@ -296,7 +296,7 @@ static u32 ndisc_hash(const void *pkey, | |||
296 | 296 | ||
297 | static int ndisc_constructor(struct neighbour *neigh) | 297 | static int ndisc_constructor(struct neighbour *neigh) |
298 | { | 298 | { |
299 | struct in6_addr *addr = (struct in6_addr*)&neigh->primary_key; | 299 | struct in6_addr *addr = (struct in6_addr *)&neigh->primary_key; |
300 | struct net_device *dev = neigh->dev; | 300 | struct net_device *dev = neigh->dev; |
301 | struct inet6_dev *in6_dev; | 301 | struct inet6_dev *in6_dev; |
302 | struct neigh_parms *parms; | 302 | struct neigh_parms *parms; |
@@ -344,7 +344,7 @@ static int ndisc_constructor(struct neighbour *neigh) | |||
344 | 344 | ||
345 | static int pndisc_constructor(struct pneigh_entry *n) | 345 | static int pndisc_constructor(struct pneigh_entry *n) |
346 | { | 346 | { |
347 | struct in6_addr *addr = (struct in6_addr*)&n->key; | 347 | struct in6_addr *addr = (struct in6_addr *)&n->key; |
348 | struct in6_addr maddr; | 348 | struct in6_addr maddr; |
349 | struct net_device *dev = n->dev; | 349 | struct net_device *dev = n->dev; |
350 | 350 | ||
@@ -357,7 +357,7 @@ static int pndisc_constructor(struct pneigh_entry *n) | |||
357 | 357 | ||
358 | static void pndisc_destructor(struct pneigh_entry *n) | 358 | static void pndisc_destructor(struct pneigh_entry *n) |
359 | { | 359 | { |
360 | struct in6_addr *addr = (struct in6_addr*)&n->key; | 360 | struct in6_addr *addr = (struct in6_addr *)&n->key; |
361 | struct in6_addr maddr; | 361 | struct in6_addr maddr; |
362 | struct net_device *dev = n->dev; | 362 | struct net_device *dev = n->dev; |
363 | 363 | ||
@@ -1065,7 +1065,7 @@ static void ndisc_router_discovery(struct sk_buff *skb) | |||
1065 | int optlen; | 1065 | int optlen; |
1066 | unsigned int pref = 0; | 1066 | unsigned int pref = 0; |
1067 | 1067 | ||
1068 | __u8 * opt = (__u8 *)(ra_msg + 1); | 1068 | __u8 *opt = (__u8 *)(ra_msg + 1); |
1069 | 1069 | ||
1070 | optlen = (skb_tail_pointer(skb) - skb_transport_header(skb)) - | 1070 | optlen = (skb_tail_pointer(skb) - skb_transport_header(skb)) - |
1071 | sizeof(struct ra_msg); | 1071 | sizeof(struct ra_msg); |
@@ -1319,7 +1319,7 @@ skip_linkparms: | |||
1319 | continue; | 1319 | continue; |
1320 | if (ri->prefix_len > in6_dev->cnf.accept_ra_rt_info_max_plen) | 1320 | if (ri->prefix_len > in6_dev->cnf.accept_ra_rt_info_max_plen) |
1321 | continue; | 1321 | continue; |
1322 | rt6_route_rcv(skb->dev, (u8*)p, (p->nd_opt_len) << 3, | 1322 | rt6_route_rcv(skb->dev, (u8 *)p, (p->nd_opt_len) << 3, |
1323 | &ipv6_hdr(skb)->saddr); | 1323 | &ipv6_hdr(skb)->saddr); |
1324 | } | 1324 | } |
1325 | } | 1325 | } |
@@ -1352,7 +1352,7 @@ skip_routeinfo: | |||
1352 | __be32 n; | 1352 | __be32 n; |
1353 | u32 mtu; | 1353 | u32 mtu; |
1354 | 1354 | ||
1355 | memcpy(&n, ((u8*)(ndopts.nd_opts_mtu+1))+2, sizeof(mtu)); | 1355 | memcpy(&n, ((u8 *)(ndopts.nd_opts_mtu+1))+2, sizeof(mtu)); |
1356 | mtu = ntohl(n); | 1356 | mtu = ntohl(n); |
1357 | 1357 | ||
1358 | if (mtu < IPV6_MIN_MTU || mtu > skb->dev->mtu) { | 1358 | if (mtu < IPV6_MIN_MTU || mtu > skb->dev->mtu) { |