aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_gre.c
diff options
context:
space:
mode:
authorDaniel Baluta <dbaluta@ixiacom.com>2012-04-14 21:34:41 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-15 12:37:19 -0400
commit5e73ea1a31c3612aa6dfe44f864ca5b7b6a4cff9 (patch)
treeab5eebe93e10e7e69042b15603a5b3844c049f6b /net/ipv4/ip_gre.c
parent586d17c5a01bf1ae4e215adc6c48457eee5482bc (diff)
ipv4: fix checkpatch errors
Fix checkpatch errors of the following type: * ERROR: "foo * bar" should be "foo *bar" * ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Daniel Baluta <dbaluta@ixiacom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_gre.c')
-rw-r--r--net/ipv4/ip_gre.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index b9abf265c2f8..f49047b79609 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -216,9 +216,9 @@ static struct rtnl_link_stats64 *ipgre_get_stats64(struct net_device *dev,
216 216
217/* Given src, dst and key, find appropriate for input tunnel. */ 217/* Given src, dst and key, find appropriate for input tunnel. */
218 218
219static struct ip_tunnel * ipgre_tunnel_lookup(struct net_device *dev, 219static struct ip_tunnel *ipgre_tunnel_lookup(struct net_device *dev,
220 __be32 remote, __be32 local, 220 __be32 remote, __be32 local,
221 __be32 key, __be16 gre_proto) 221 __be32 key, __be16 gre_proto)
222{ 222{
223 struct net *net = dev_net(dev); 223 struct net *net = dev_net(dev);
224 int link = dev->ifindex; 224 int link = dev->ifindex;
@@ -483,7 +483,7 @@ static void ipgre_err(struct sk_buff *skb, u32 info)
483 */ 483 */
484 484
485 const struct iphdr *iph = (const struct iphdr *)skb->data; 485 const struct iphdr *iph = (const struct iphdr *)skb->data;
486 __be16 *p = (__be16*)(skb->data+(iph->ihl<<2)); 486 __be16 *p = (__be16 *)(skb->data+(iph->ihl<<2));
487 int grehlen = (iph->ihl<<2) + 4; 487 int grehlen = (iph->ihl<<2) + 4;
488 const int type = icmp_hdr(skb)->type; 488 const int type = icmp_hdr(skb)->type;
489 const int code = icmp_hdr(skb)->code; 489 const int code = icmp_hdr(skb)->code;
@@ -593,7 +593,7 @@ static int ipgre_rcv(struct sk_buff *skb)
593 593
594 iph = ip_hdr(skb); 594 iph = ip_hdr(skb);
595 h = skb->data; 595 h = skb->data;
596 flags = *(__be16*)h; 596 flags = *(__be16 *)h;
597 597
598 if (flags&(GRE_CSUM|GRE_KEY|GRE_ROUTING|GRE_SEQ|GRE_VERSION)) { 598 if (flags&(GRE_CSUM|GRE_KEY|GRE_ROUTING|GRE_SEQ|GRE_VERSION)) {
599 /* - Version must be 0. 599 /* - Version must be 0.
@@ -617,11 +617,11 @@ static int ipgre_rcv(struct sk_buff *skb)
617 offset += 4; 617 offset += 4;
618 } 618 }
619 if (flags&GRE_KEY) { 619 if (flags&GRE_KEY) {
620 key = *(__be32*)(h + offset); 620 key = *(__be32 *)(h + offset);
621 offset += 4; 621 offset += 4;
622 } 622 }
623 if (flags&GRE_SEQ) { 623 if (flags&GRE_SEQ) {
624 seqno = ntohl(*(__be32*)(h + offset)); 624 seqno = ntohl(*(__be32 *)(h + offset));
625 offset += 4; 625 offset += 4;
626 } 626 }
627 } 627 }
@@ -921,7 +921,7 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
921 htons(ETH_P_TEB) : skb->protocol; 921 htons(ETH_P_TEB) : skb->protocol;
922 922
923 if (tunnel->parms.o_flags&(GRE_KEY|GRE_CSUM|GRE_SEQ)) { 923 if (tunnel->parms.o_flags&(GRE_KEY|GRE_CSUM|GRE_SEQ)) {
924 __be32 *ptr = (__be32*)(((u8*)iph) + tunnel->hlen - 4); 924 __be32 *ptr = (__be32 *)(((u8 *)iph) + tunnel->hlen - 4);
925 925
926 if (tunnel->parms.o_flags&GRE_SEQ) { 926 if (tunnel->parms.o_flags&GRE_SEQ) {
927 ++tunnel->o_seqno; 927 ++tunnel->o_seqno;
@@ -934,7 +934,7 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
934 } 934 }
935 if (tunnel->parms.o_flags&GRE_CSUM) { 935 if (tunnel->parms.o_flags&GRE_CSUM) {
936 *ptr = 0; 936 *ptr = 0;
937 *(__sum16*)ptr = ip_compute_csum((void*)(iph+1), skb->len - sizeof(struct iphdr)); 937 *(__sum16 *)ptr = ip_compute_csum((void *)(iph+1), skb->len - sizeof(struct iphdr));
938 } 938 }
939 } 939 }
940 940
@@ -1190,7 +1190,7 @@ static int ipgre_header(struct sk_buff *skb, struct net_device *dev,
1190{ 1190{
1191 struct ip_tunnel *t = netdev_priv(dev); 1191 struct ip_tunnel *t = netdev_priv(dev);
1192 struct iphdr *iph = (struct iphdr *)skb_push(skb, t->hlen); 1192 struct iphdr *iph = (struct iphdr *)skb_push(skb, t->hlen);
1193 __be16 *p = (__be16*)(iph+1); 1193 __be16 *p = (__be16 *)(iph+1);
1194 1194
1195 memcpy(iph, &t->parms.iph, sizeof(struct iphdr)); 1195 memcpy(iph, &t->parms.iph, sizeof(struct iphdr));
1196 p[0] = t->parms.o_flags; 1196 p[0] = t->parms.o_flags;