diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-04-10 23:10:33 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:24:09 -0400 |
commit | e71a4783aae059931f63b2d4e7013e36529badef (patch) | |
tree | d9c2bad69b8d0512e12c8ff786237319990fbd00 /net/core/pktgen.c | |
parent | add459aa1afe05472abc96f6a29aefd0c84e73d6 (diff) |
[NET] core: whitespace cleanup
Fix whitespace around keywords. Fix indentation especially of switch
statements.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/pktgen.c')
-rw-r--r-- | net/core/pktgen.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 895739fdfac3..10d33fc233b3 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -645,7 +645,7 @@ static int pktgen_if_show(struct seq_file *seq, void *v) | |||
645 | if (pkt_dev->nr_labels) { | 645 | if (pkt_dev->nr_labels) { |
646 | unsigned i; | 646 | unsigned i; |
647 | seq_printf(seq, " mpls: "); | 647 | seq_printf(seq, " mpls: "); |
648 | for(i = 0; i < pkt_dev->nr_labels; i++) | 648 | for (i = 0; i < pkt_dev->nr_labels; i++) |
649 | seq_printf(seq, "%08x%s", ntohl(pkt_dev->labels[i]), | 649 | seq_printf(seq, "%08x%s", ntohl(pkt_dev->labels[i]), |
650 | i == pkt_dev->nr_labels-1 ? "\n" : ", "); | 650 | i == pkt_dev->nr_labels-1 ? "\n" : ", "); |
651 | } | 651 | } |
@@ -750,7 +750,7 @@ static int hex32_arg(const char __user *user_buffer, unsigned long maxlen, __u32 | |||
750 | int i = 0; | 750 | int i = 0; |
751 | *num = 0; | 751 | *num = 0; |
752 | 752 | ||
753 | for(; i < maxlen; i++) { | 753 | for (; i < maxlen; i++) { |
754 | char c; | 754 | char c; |
755 | *num <<= 4; | 755 | *num <<= 4; |
756 | if (get_user(c, &user_buffer[i])) | 756 | if (get_user(c, &user_buffer[i])) |
@@ -858,7 +858,7 @@ static ssize_t get_labels(const char __user *buffer, struct pktgen_dev *pkt_dev) | |||
858 | n++; | 858 | n++; |
859 | if (n >= MAX_MPLS_LABELS) | 859 | if (n >= MAX_MPLS_LABELS) |
860 | return -E2BIG; | 860 | return -E2BIG; |
861 | } while(c == ','); | 861 | } while (c == ','); |
862 | 862 | ||
863 | pkt_dev->nr_labels = n; | 863 | pkt_dev->nr_labels = n; |
864 | return i; | 864 | return i; |
@@ -1487,7 +1487,7 @@ static ssize_t pktgen_if_write(struct file *file, | |||
1487 | if (len < 0) { return len; } | 1487 | if (len < 0) { return len; } |
1488 | i += len; | 1488 | i += len; |
1489 | offset = sprintf(pg_result, "OK: mpls="); | 1489 | offset = sprintf(pg_result, "OK: mpls="); |
1490 | for(n = 0; n < pkt_dev->nr_labels; n++) | 1490 | for (n = 0; n < pkt_dev->nr_labels; n++) |
1491 | offset += sprintf(pg_result + offset, | 1491 | offset += sprintf(pg_result + offset, |
1492 | "%08x%s", ntohl(pkt_dev->labels[n]), | 1492 | "%08x%s", ntohl(pkt_dev->labels[n]), |
1493 | n == pkt_dev->nr_labels-1 ? "" : ","); | 1493 | n == pkt_dev->nr_labels-1 ? "" : ","); |
@@ -2148,7 +2148,7 @@ static void mod_cur_headers(struct pktgen_dev *pkt_dev) | |||
2148 | 2148 | ||
2149 | if (pkt_dev->flags & F_MPLS_RND) { | 2149 | if (pkt_dev->flags & F_MPLS_RND) { |
2150 | unsigned i; | 2150 | unsigned i; |
2151 | for(i = 0; i < pkt_dev->nr_labels; i++) | 2151 | for (i = 0; i < pkt_dev->nr_labels; i++) |
2152 | if (pkt_dev->labels[i] & MPLS_STACK_BOTTOM) | 2152 | if (pkt_dev->labels[i] & MPLS_STACK_BOTTOM) |
2153 | pkt_dev->labels[i] = MPLS_STACK_BOTTOM | | 2153 | pkt_dev->labels[i] = MPLS_STACK_BOTTOM | |
2154 | ((__force __be32)random32() & | 2154 | ((__force __be32)random32() & |
@@ -2281,7 +2281,7 @@ static void mod_cur_headers(struct pktgen_dev *pkt_dev) | |||
2281 | static void mpls_push(__be32 *mpls, struct pktgen_dev *pkt_dev) | 2281 | static void mpls_push(__be32 *mpls, struct pktgen_dev *pkt_dev) |
2282 | { | 2282 | { |
2283 | unsigned i; | 2283 | unsigned i; |
2284 | for(i = 0; i < pkt_dev->nr_labels; i++) { | 2284 | for (i = 0; i < pkt_dev->nr_labels; i++) { |
2285 | *mpls++ = pkt_dev->labels[i] & ~MPLS_STACK_BOTTOM; | 2285 | *mpls++ = pkt_dev->labels[i] & ~MPLS_STACK_BOTTOM; |
2286 | } | 2286 | } |
2287 | mpls--; | 2287 | mpls--; |
@@ -2341,7 +2341,7 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev, | |||
2341 | mpls_push(mpls, pkt_dev); | 2341 | mpls_push(mpls, pkt_dev); |
2342 | 2342 | ||
2343 | if (pkt_dev->vlan_id != 0xffff) { | 2343 | if (pkt_dev->vlan_id != 0xffff) { |
2344 | if(pkt_dev->svlan_id != 0xffff) { | 2344 | if (pkt_dev->svlan_id != 0xffff) { |
2345 | svlan_tci = (__be16 *)skb_put(skb, sizeof(__be16)); | 2345 | svlan_tci = (__be16 *)skb_put(skb, sizeof(__be16)); |
2346 | *svlan_tci = build_tci(pkt_dev->svlan_id, | 2346 | *svlan_tci = build_tci(pkt_dev->svlan_id, |
2347 | pkt_dev->svlan_cfi, | 2347 | pkt_dev->svlan_cfi, |
@@ -2677,7 +2677,7 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev, | |||
2677 | mpls_push(mpls, pkt_dev); | 2677 | mpls_push(mpls, pkt_dev); |
2678 | 2678 | ||
2679 | if (pkt_dev->vlan_id != 0xffff) { | 2679 | if (pkt_dev->vlan_id != 0xffff) { |
2680 | if(pkt_dev->svlan_id != 0xffff) { | 2680 | if (pkt_dev->svlan_id != 0xffff) { |
2681 | svlan_tci = (__be16 *)skb_put(skb, sizeof(__be16)); | 2681 | svlan_tci = (__be16 *)skb_put(skb, sizeof(__be16)); |
2682 | *svlan_tci = build_tci(pkt_dev->svlan_id, | 2682 | *svlan_tci = build_tci(pkt_dev->svlan_id, |
2683 | pkt_dev->svlan_cfi, | 2683 | pkt_dev->svlan_cfi, |