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/ip6_output.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/ip6_output.c')
-rw-r--r-- | net/ipv6/ip6_output.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 315a55d66079..4ead5547b5c6 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -20,7 +20,7 @@ | |||
20 | * etc. | 20 | * etc. |
21 | * | 21 | * |
22 | * H. von Brand : Added missing #include <linux/string.h> | 22 | * H. von Brand : Added missing #include <linux/string.h> |
23 | * Imran Patel : frag id should be in NBO | 23 | * Imran Patel : frag id should be in NBO |
24 | * Kazunori MIYAZAWA @USAGI | 24 | * Kazunori MIYAZAWA @USAGI |
25 | * : add ip6_append_data and related functions | 25 | * : add ip6_append_data and related functions |
26 | * for datagram xmit | 26 | * for datagram xmit |
@@ -555,14 +555,14 @@ static void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt) | |||
555 | int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) | 555 | int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) |
556 | { | 556 | { |
557 | struct sk_buff *frag; | 557 | struct sk_buff *frag; |
558 | struct rt6_info *rt = (struct rt6_info*)skb_dst(skb); | 558 | struct rt6_info *rt = (struct rt6_info *)skb_dst(skb); |
559 | struct ipv6_pinfo *np = skb->sk ? inet6_sk(skb->sk) : NULL; | 559 | struct ipv6_pinfo *np = skb->sk ? inet6_sk(skb->sk) : NULL; |
560 | struct ipv6hdr *tmp_hdr; | 560 | struct ipv6hdr *tmp_hdr; |
561 | struct frag_hdr *fh; | 561 | struct frag_hdr *fh; |
562 | unsigned int mtu, hlen, left, len; | 562 | unsigned int mtu, hlen, left, len; |
563 | int hroom, troom; | 563 | int hroom, troom; |
564 | __be32 frag_id = 0; | 564 | __be32 frag_id = 0; |
565 | int ptr, offset = 0, err=0; | 565 | int ptr, offset = 0, err = 0; |
566 | u8 *prevhdr, nexthdr = 0; | 566 | u8 *prevhdr, nexthdr = 0; |
567 | struct net *net = dev_net(skb_dst(skb)->dev); | 567 | struct net *net = dev_net(skb_dst(skb)->dev); |
568 | 568 | ||
@@ -637,7 +637,7 @@ int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) | |||
637 | } | 637 | } |
638 | 638 | ||
639 | __skb_pull(skb, hlen); | 639 | __skb_pull(skb, hlen); |
640 | fh = (struct frag_hdr*)__skb_push(skb, sizeof(struct frag_hdr)); | 640 | fh = (struct frag_hdr *)__skb_push(skb, sizeof(struct frag_hdr)); |
641 | __skb_push(skb, hlen); | 641 | __skb_push(skb, hlen); |
642 | skb_reset_network_header(skb); | 642 | skb_reset_network_header(skb); |
643 | memcpy(skb_network_header(skb), tmp_hdr, hlen); | 643 | memcpy(skb_network_header(skb), tmp_hdr, hlen); |
@@ -662,7 +662,7 @@ int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) | |||
662 | if (frag) { | 662 | if (frag) { |
663 | frag->ip_summed = CHECKSUM_NONE; | 663 | frag->ip_summed = CHECKSUM_NONE; |
664 | skb_reset_transport_header(frag); | 664 | skb_reset_transport_header(frag); |
665 | fh = (struct frag_hdr*)__skb_push(frag, sizeof(struct frag_hdr)); | 665 | fh = (struct frag_hdr *)__skb_push(frag, sizeof(struct frag_hdr)); |
666 | __skb_push(frag, hlen); | 666 | __skb_push(frag, hlen); |
667 | skb_reset_network_header(frag); | 667 | skb_reset_network_header(frag); |
668 | memcpy(skb_network_header(frag), tmp_hdr, | 668 | memcpy(skb_network_header(frag), tmp_hdr, |
@@ -681,7 +681,7 @@ int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) | |||
681 | } | 681 | } |
682 | 682 | ||
683 | err = output(skb); | 683 | err = output(skb); |
684 | if(!err) | 684 | if (!err) |
685 | IP6_INC_STATS(net, ip6_dst_idev(&rt->dst), | 685 | IP6_INC_STATS(net, ip6_dst_idev(&rt->dst), |
686 | IPSTATS_MIB_FRAGCREATES); | 686 | IPSTATS_MIB_FRAGCREATES); |
687 | 687 | ||
@@ -742,7 +742,7 @@ slow_path: | |||
742 | /* | 742 | /* |
743 | * Keep copying data until we run out. | 743 | * Keep copying data until we run out. |
744 | */ | 744 | */ |
745 | while(left > 0) { | 745 | while (left > 0) { |
746 | len = left; | 746 | len = left; |
747 | /* IF: it doesn't fit, use 'mtu' - the data space left */ | 747 | /* IF: it doesn't fit, use 'mtu' - the data space left */ |
748 | if (len > mtu) | 748 | if (len > mtu) |
@@ -865,7 +865,7 @@ static struct dst_entry *ip6_sk_dst_check(struct sock *sk, | |||
865 | /* Yes, checking route validity in not connected | 865 | /* Yes, checking route validity in not connected |
866 | * case is not very simple. Take into account, | 866 | * case is not very simple. Take into account, |
867 | * that we do not support routing by source, TOS, | 867 | * that we do not support routing by source, TOS, |
868 | * and MSG_DONTROUTE --ANK (980726) | 868 | * and MSG_DONTROUTE --ANK (980726) |
869 | * | 869 | * |
870 | * 1. ip6_rt_check(): If route was host route, | 870 | * 1. ip6_rt_check(): If route was host route, |
871 | * check that cached destination is current. | 871 | * check that cached destination is current. |
@@ -1049,7 +1049,7 @@ static inline int ip6_ufo_append_data(struct sock *sk, | |||
1049 | int getfrag(void *from, char *to, int offset, int len, | 1049 | int getfrag(void *from, char *to, int offset, int len, |
1050 | int odd, struct sk_buff *skb), | 1050 | int odd, struct sk_buff *skb), |
1051 | void *from, int length, int hh_len, int fragheaderlen, | 1051 | void *from, int length, int hh_len, int fragheaderlen, |
1052 | int transhdrlen, int mtu,unsigned int flags, | 1052 | int transhdrlen, int mtu, unsigned int flags, |
1053 | struct rt6_info *rt) | 1053 | struct rt6_info *rt) |
1054 | 1054 | ||
1055 | { | 1055 | { |
@@ -1072,7 +1072,7 @@ static inline int ip6_ufo_append_data(struct sock *sk, | |||
1072 | skb_reserve(skb, hh_len); | 1072 | skb_reserve(skb, hh_len); |
1073 | 1073 | ||
1074 | /* create space for UDP/IP header */ | 1074 | /* create space for UDP/IP header */ |
1075 | skb_put(skb,fragheaderlen + transhdrlen); | 1075 | skb_put(skb, fragheaderlen + transhdrlen); |
1076 | 1076 | ||
1077 | /* initialize network header pointer */ | 1077 | /* initialize network header pointer */ |
1078 | skb_reset_network_header(skb); | 1078 | skb_reset_network_header(skb); |