diff options
author | Joe Perches <joe@perches.com> | 2009-11-23 13:41:23 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-23 13:41:23 -0500 |
commit | 9d4fb27db90043cd2640e4bc778f9c755d3c17c1 (patch) | |
tree | 53f1b0851fdd02e78a18f1a9db57e7cc22e2b280 /net/ipv4/inet_lro.c | |
parent | 6ebfbc065624790772398f5b327ac33a7ae3880b (diff) |
net/ipv4: Move && and || to end of previous line
On Sun, 2009-11-22 at 16:31 -0800, David Miller wrote:
> It should be of the form:
> if (x &&
> y)
>
> or:
> if (x && y)
>
> Fix patches, rather than complaints, for existing cases where things
> do not follow this pattern are certainly welcome.
Also collapsed some multiple tabs to single space.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/inet_lro.c')
-rw-r--r-- | net/ipv4/inet_lro.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/net/ipv4/inet_lro.c b/net/ipv4/inet_lro.c index 6a667dae315e..47038cb6c138 100644 --- a/net/ipv4/inet_lro.c +++ b/net/ipv4/inet_lro.c | |||
@@ -64,15 +64,15 @@ static int lro_tcp_ip_check(struct iphdr *iph, struct tcphdr *tcph, | |||
64 | if (iph->ihl != IPH_LEN_WO_OPTIONS) | 64 | if (iph->ihl != IPH_LEN_WO_OPTIONS) |
65 | return -1; | 65 | return -1; |
66 | 66 | ||
67 | if (tcph->cwr || tcph->ece || tcph->urg || !tcph->ack | 67 | if (tcph->cwr || tcph->ece || tcph->urg || !tcph->ack || |
68 | || tcph->rst || tcph->syn || tcph->fin) | 68 | tcph->rst || tcph->syn || tcph->fin) |
69 | return -1; | 69 | return -1; |
70 | 70 | ||
71 | if (INET_ECN_is_ce(ipv4_get_dsfield(iph))) | 71 | if (INET_ECN_is_ce(ipv4_get_dsfield(iph))) |
72 | return -1; | 72 | return -1; |
73 | 73 | ||
74 | if (tcph->doff != TCPH_LEN_WO_OPTIONS | 74 | if (tcph->doff != TCPH_LEN_WO_OPTIONS && |
75 | && tcph->doff != TCPH_LEN_W_TIMESTAMP) | 75 | tcph->doff != TCPH_LEN_W_TIMESTAMP) |
76 | return -1; | 76 | return -1; |
77 | 77 | ||
78 | /* check tcp options (only timestamp allowed) */ | 78 | /* check tcp options (only timestamp allowed) */ |
@@ -262,10 +262,10 @@ static int lro_check_tcp_conn(struct net_lro_desc *lro_desc, | |||
262 | struct iphdr *iph, | 262 | struct iphdr *iph, |
263 | struct tcphdr *tcph) | 263 | struct tcphdr *tcph) |
264 | { | 264 | { |
265 | if ((lro_desc->iph->saddr != iph->saddr) | 265 | if ((lro_desc->iph->saddr != iph->saddr) || |
266 | || (lro_desc->iph->daddr != iph->daddr) | 266 | (lro_desc->iph->daddr != iph->daddr) || |
267 | || (lro_desc->tcph->source != tcph->source) | 267 | (lro_desc->tcph->source != tcph->source) || |
268 | || (lro_desc->tcph->dest != tcph->dest)) | 268 | (lro_desc->tcph->dest != tcph->dest)) |
269 | return -1; | 269 | return -1; |
270 | return 0; | 270 | return 0; |
271 | } | 271 | } |
@@ -339,9 +339,9 @@ static int __lro_proc_skb(struct net_lro_mgr *lro_mgr, struct sk_buff *skb, | |||
339 | u64 flags; | 339 | u64 flags; |
340 | int vlan_hdr_len = 0; | 340 | int vlan_hdr_len = 0; |
341 | 341 | ||
342 | if (!lro_mgr->get_skb_header | 342 | if (!lro_mgr->get_skb_header || |
343 | || lro_mgr->get_skb_header(skb, (void *)&iph, (void *)&tcph, | 343 | lro_mgr->get_skb_header(skb, (void *)&iph, (void *)&tcph, |
344 | &flags, priv)) | 344 | &flags, priv)) |
345 | goto out; | 345 | goto out; |
346 | 346 | ||
347 | if (!(flags & LRO_IPV4) || !(flags & LRO_TCP)) | 347 | if (!(flags & LRO_IPV4) || !(flags & LRO_TCP)) |
@@ -351,8 +351,8 @@ static int __lro_proc_skb(struct net_lro_mgr *lro_mgr, struct sk_buff *skb, | |||
351 | if (!lro_desc) | 351 | if (!lro_desc) |
352 | goto out; | 352 | goto out; |
353 | 353 | ||
354 | if ((skb->protocol == htons(ETH_P_8021Q)) | 354 | if ((skb->protocol == htons(ETH_P_8021Q)) && |
355 | && !(lro_mgr->features & LRO_F_EXTRACT_VLAN_ID)) | 355 | !(lro_mgr->features & LRO_F_EXTRACT_VLAN_ID)) |
356 | vlan_hdr_len = VLAN_HLEN; | 356 | vlan_hdr_len = VLAN_HLEN; |
357 | 357 | ||
358 | if (!lro_desc->active) { /* start new lro session */ | 358 | if (!lro_desc->active) { /* start new lro session */ |
@@ -446,9 +446,9 @@ static struct sk_buff *__lro_proc_segment(struct net_lro_mgr *lro_mgr, | |||
446 | int hdr_len = LRO_MAX_PG_HLEN; | 446 | int hdr_len = LRO_MAX_PG_HLEN; |
447 | int vlan_hdr_len = 0; | 447 | int vlan_hdr_len = 0; |
448 | 448 | ||
449 | if (!lro_mgr->get_frag_header | 449 | if (!lro_mgr->get_frag_header || |
450 | || lro_mgr->get_frag_header(frags, (void *)&mac_hdr, (void *)&iph, | 450 | lro_mgr->get_frag_header(frags, (void *)&mac_hdr, (void *)&iph, |
451 | (void *)&tcph, &flags, priv)) { | 451 | (void *)&tcph, &flags, priv)) { |
452 | mac_hdr = page_address(frags->page) + frags->page_offset; | 452 | mac_hdr = page_address(frags->page) + frags->page_offset; |
453 | goto out1; | 453 | goto out1; |
454 | } | 454 | } |
@@ -472,8 +472,8 @@ static struct sk_buff *__lro_proc_segment(struct net_lro_mgr *lro_mgr, | |||
472 | if (!skb) | 472 | if (!skb) |
473 | goto out; | 473 | goto out; |
474 | 474 | ||
475 | if ((skb->protocol == htons(ETH_P_8021Q)) | 475 | if ((skb->protocol == htons(ETH_P_8021Q)) && |
476 | && !(lro_mgr->features & LRO_F_EXTRACT_VLAN_ID)) | 476 | !(lro_mgr->features & LRO_F_EXTRACT_VLAN_ID)) |
477 | vlan_hdr_len = VLAN_HLEN; | 477 | vlan_hdr_len = VLAN_HLEN; |
478 | 478 | ||
479 | iph = (void *)(skb->data + vlan_hdr_len); | 479 | iph = (void *)(skb->data + vlan_hdr_len); |