diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-09-22 16:43:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-23 17:33:39 -0400 |
commit | a02cec2155fbea457eca8881870fd2de1a4c4c76 (patch) | |
tree | cfbfc4b32bfe10f9cd803d46c31607d13f1858f5 | |
parent | 6a08d194ee40806e0ccd5f36ed768e64cbfc979f (diff) |
net: return operator cleanup
Change "return (EXPR);" to "return EXPR;"
return is not a function, parentheses are not required.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
84 files changed, 220 insertions, 222 deletions
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index f6481daf6e52..a8e4e832cdbb 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
@@ -449,7 +449,7 @@ void vcc_insert_socket(struct sock *sk); | |||
449 | 449 | ||
450 | static inline int atm_guess_pdu2truesize(int size) | 450 | static inline int atm_guess_pdu2truesize(int size) |
451 | { | 451 | { |
452 | return (SKB_DATA_ALIGN(size) + sizeof(struct skb_shared_info)); | 452 | return SKB_DATA_ALIGN(size) + sizeof(struct skb_shared_info); |
453 | } | 453 | } |
454 | 454 | ||
455 | 455 | ||
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index fb6aa6070921..f16a01081e15 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
@@ -71,7 +71,7 @@ static inline int is_zero_ether_addr(const u8 *addr) | |||
71 | */ | 71 | */ |
72 | static inline int is_multicast_ether_addr(const u8 *addr) | 72 | static inline int is_multicast_ether_addr(const u8 *addr) |
73 | { | 73 | { |
74 | return (0x01 & addr[0]); | 74 | return 0x01 & addr[0]; |
75 | } | 75 | } |
76 | 76 | ||
77 | /** | 77 | /** |
@@ -82,7 +82,7 @@ static inline int is_multicast_ether_addr(const u8 *addr) | |||
82 | */ | 82 | */ |
83 | static inline int is_local_ether_addr(const u8 *addr) | 83 | static inline int is_local_ether_addr(const u8 *addr) |
84 | { | 84 | { |
85 | return (0x02 & addr[0]); | 85 | return 0x02 & addr[0]; |
86 | } | 86 | } |
87 | 87 | ||
88 | /** | 88 | /** |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index f7f1302138af..45dcda5bfda9 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1676,7 +1676,7 @@ static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index) | |||
1676 | */ | 1676 | */ |
1677 | static inline int netif_is_multiqueue(const struct net_device *dev) | 1677 | static inline int netif_is_multiqueue(const struct net_device *dev) |
1678 | { | 1678 | { |
1679 | return (dev->num_tx_queues > 1); | 1679 | return dev->num_tx_queues > 1; |
1680 | } | 1680 | } |
1681 | 1681 | ||
1682 | extern void netif_set_real_num_tx_queues(struct net_device *dev, | 1682 | extern void netif_set_real_num_tx_queues(struct net_device *dev, |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 9e8085a89589..b2c41d19735c 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -601,7 +601,7 @@ static inline int skb_queue_empty(const struct sk_buff_head *list) | |||
601 | static inline bool skb_queue_is_last(const struct sk_buff_head *list, | 601 | static inline bool skb_queue_is_last(const struct sk_buff_head *list, |
602 | const struct sk_buff *skb) | 602 | const struct sk_buff *skb) |
603 | { | 603 | { |
604 | return (skb->next == (struct sk_buff *) list); | 604 | return skb->next == (struct sk_buff *)list; |
605 | } | 605 | } |
606 | 606 | ||
607 | /** | 607 | /** |
@@ -614,7 +614,7 @@ static inline bool skb_queue_is_last(const struct sk_buff_head *list, | |||
614 | static inline bool skb_queue_is_first(const struct sk_buff_head *list, | 614 | static inline bool skb_queue_is_first(const struct sk_buff_head *list, |
615 | const struct sk_buff *skb) | 615 | const struct sk_buff *skb) |
616 | { | 616 | { |
617 | return (skb->prev == (struct sk_buff *) list); | 617 | return skb->prev == (struct sk_buff *)list; |
618 | } | 618 | } |
619 | 619 | ||
620 | /** | 620 | /** |
@@ -2156,7 +2156,7 @@ static inline u16 skb_get_rx_queue(const struct sk_buff *skb) | |||
2156 | 2156 | ||
2157 | static inline bool skb_rx_queue_recorded(const struct sk_buff *skb) | 2157 | static inline bool skb_rx_queue_recorded(const struct sk_buff *skb) |
2158 | { | 2158 | { |
2159 | return (skb->queue_mapping != 0); | 2159 | return skb->queue_mapping != 0; |
2160 | } | 2160 | } |
2161 | 2161 | ||
2162 | extern u16 skb_tx_hash(const struct net_device *dev, | 2162 | extern u16 skb_tx_hash(const struct net_device *dev, |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 4568b938ca35..ebec8c9a929d 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -233,7 +233,7 @@ static inline void inquiry_cache_init(struct hci_dev *hdev) | |||
233 | static inline int inquiry_cache_empty(struct hci_dev *hdev) | 233 | static inline int inquiry_cache_empty(struct hci_dev *hdev) |
234 | { | 234 | { |
235 | struct inquiry_cache *c = &hdev->inq_cache; | 235 | struct inquiry_cache *c = &hdev->inq_cache; |
236 | return (c->list == NULL); | 236 | return c->list == NULL; |
237 | } | 237 | } |
238 | 238 | ||
239 | static inline long inquiry_cache_age(struct hci_dev *hdev) | 239 | static inline long inquiry_cache_age(struct hci_dev *hdev) |
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 6c241444f902..c819c8bf9b68 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -414,7 +414,7 @@ static inline int l2cap_tx_window_full(struct sock *sk) | |||
414 | if (sub < 0) | 414 | if (sub < 0) |
415 | sub += 64; | 415 | sub += 64; |
416 | 416 | ||
417 | return (sub == pi->remote_tx_win); | 417 | return sub == pi->remote_tx_win; |
418 | } | 418 | } |
419 | 419 | ||
420 | #define __get_txseq(ctrl) ((ctrl) & L2CAP_CTRL_TXSEQ) >> 1 | 420 | #define __get_txseq(ctrl) ((ctrl) & L2CAP_CTRL_TXSEQ) >> 1 |
diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h index 9b5d08f4f6e8..88bdd010d65d 100644 --- a/include/net/inet_ecn.h +++ b/include/net/inet_ecn.h | |||
@@ -27,7 +27,7 @@ static inline int INET_ECN_is_not_ect(__u8 dsfield) | |||
27 | 27 | ||
28 | static inline int INET_ECN_is_capable(__u8 dsfield) | 28 | static inline int INET_ECN_is_capable(__u8 dsfield) |
29 | { | 29 | { |
30 | return (dsfield & INET_ECN_ECT_0); | 30 | return dsfield & INET_ECN_ECT_0; |
31 | } | 31 | } |
32 | 32 | ||
33 | static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner) | 33 | static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner) |
diff --git a/include/net/ip.h b/include/net/ip.h index 7691aca133db..dbee3fe260e1 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -238,9 +238,9 @@ int ip_decrease_ttl(struct iphdr *iph) | |||
238 | static inline | 238 | static inline |
239 | int ip_dont_fragment(struct sock *sk, struct dst_entry *dst) | 239 | int ip_dont_fragment(struct sock *sk, struct dst_entry *dst) |
240 | { | 240 | { |
241 | return (inet_sk(sk)->pmtudisc == IP_PMTUDISC_DO || | 241 | return inet_sk(sk)->pmtudisc == IP_PMTUDISC_DO || |
242 | (inet_sk(sk)->pmtudisc == IP_PMTUDISC_WANT && | 242 | (inet_sk(sk)->pmtudisc == IP_PMTUDISC_WANT && |
243 | !(dst_metric_locked(dst, RTAX_MTU)))); | 243 | !(dst_metric_locked(dst, RTAX_MTU))); |
244 | } | 244 | } |
245 | 245 | ||
246 | extern void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more); | 246 | extern void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more); |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 1f8412410998..4a3cd2cd2f5e 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -262,7 +262,7 @@ static inline int ipv6_addr_scope(const struct in6_addr *addr) | |||
262 | 262 | ||
263 | static inline int __ipv6_addr_src_scope(int type) | 263 | static inline int __ipv6_addr_src_scope(int type) |
264 | { | 264 | { |
265 | return (type == IPV6_ADDR_ANY ? __IPV6_ADDR_SCOPE_INVALID : (type >> 16)); | 265 | return (type == IPV6_ADDR_ANY) ? __IPV6_ADDR_SCOPE_INVALID : (type >> 16); |
266 | } | 266 | } |
267 | 267 | ||
268 | static inline int ipv6_addr_src_scope(const struct in6_addr *addr) | 268 | static inline int ipv6_addr_src_scope(const struct in6_addr *addr) |
@@ -279,10 +279,10 @@ static inline int | |||
279 | ipv6_masked_addr_cmp(const struct in6_addr *a1, const struct in6_addr *m, | 279 | ipv6_masked_addr_cmp(const struct in6_addr *a1, const struct in6_addr *m, |
280 | const struct in6_addr *a2) | 280 | const struct in6_addr *a2) |
281 | { | 281 | { |
282 | return (!!(((a1->s6_addr32[0] ^ a2->s6_addr32[0]) & m->s6_addr32[0]) | | 282 | return !!(((a1->s6_addr32[0] ^ a2->s6_addr32[0]) & m->s6_addr32[0]) | |
283 | ((a1->s6_addr32[1] ^ a2->s6_addr32[1]) & m->s6_addr32[1]) | | 283 | ((a1->s6_addr32[1] ^ a2->s6_addr32[1]) & m->s6_addr32[1]) | |
284 | ((a1->s6_addr32[2] ^ a2->s6_addr32[2]) & m->s6_addr32[2]) | | 284 | ((a1->s6_addr32[2] ^ a2->s6_addr32[2]) & m->s6_addr32[2]) | |
285 | ((a1->s6_addr32[3] ^ a2->s6_addr32[3]) & m->s6_addr32[3]))); | 285 | ((a1->s6_addr32[3] ^ a2->s6_addr32[3]) & m->s6_addr32[3])); |
286 | } | 286 | } |
287 | 287 | ||
288 | static inline void ipv6_addr_copy(struct in6_addr *a1, const struct in6_addr *a2) | 288 | static inline void ipv6_addr_copy(struct in6_addr *a1, const struct in6_addr *a2) |
@@ -317,10 +317,10 @@ static inline void ipv6_addr_set(struct in6_addr *addr, | |||
317 | static inline int ipv6_addr_equal(const struct in6_addr *a1, | 317 | static inline int ipv6_addr_equal(const struct in6_addr *a1, |
318 | const struct in6_addr *a2) | 318 | const struct in6_addr *a2) |
319 | { | 319 | { |
320 | return (((a1->s6_addr32[0] ^ a2->s6_addr32[0]) | | 320 | return ((a1->s6_addr32[0] ^ a2->s6_addr32[0]) | |
321 | (a1->s6_addr32[1] ^ a2->s6_addr32[1]) | | 321 | (a1->s6_addr32[1] ^ a2->s6_addr32[1]) | |
322 | (a1->s6_addr32[2] ^ a2->s6_addr32[2]) | | 322 | (a1->s6_addr32[2] ^ a2->s6_addr32[2]) | |
323 | (a1->s6_addr32[3] ^ a2->s6_addr32[3])) == 0); | 323 | (a1->s6_addr32[3] ^ a2->s6_addr32[3])) == 0; |
324 | } | 324 | } |
325 | 325 | ||
326 | static inline int __ipv6_prefix_equal(const __be32 *a1, const __be32 *a2, | 326 | static inline int __ipv6_prefix_equal(const __be32 *a1, const __be32 *a2, |
@@ -373,20 +373,20 @@ int ip6_frag_match(struct inet_frag_queue *q, void *a); | |||
373 | 373 | ||
374 | static inline int ipv6_addr_any(const struct in6_addr *a) | 374 | static inline int ipv6_addr_any(const struct in6_addr *a) |
375 | { | 375 | { |
376 | return ((a->s6_addr32[0] | a->s6_addr32[1] | | 376 | return (a->s6_addr32[0] | a->s6_addr32[1] | |
377 | a->s6_addr32[2] | a->s6_addr32[3] ) == 0); | 377 | a->s6_addr32[2] | a->s6_addr32[3]) == 0; |
378 | } | 378 | } |
379 | 379 | ||
380 | static inline int ipv6_addr_loopback(const struct in6_addr *a) | 380 | static inline int ipv6_addr_loopback(const struct in6_addr *a) |
381 | { | 381 | { |
382 | return ((a->s6_addr32[0] | a->s6_addr32[1] | | 382 | return (a->s6_addr32[0] | a->s6_addr32[1] | |
383 | a->s6_addr32[2] | (a->s6_addr32[3] ^ htonl(1))) == 0); | 383 | a->s6_addr32[2] | (a->s6_addr32[3] ^ htonl(1))) == 0; |
384 | } | 384 | } |
385 | 385 | ||
386 | static inline int ipv6_addr_v4mapped(const struct in6_addr *a) | 386 | static inline int ipv6_addr_v4mapped(const struct in6_addr *a) |
387 | { | 387 | { |
388 | return ((a->s6_addr32[0] | a->s6_addr32[1] | | 388 | return (a->s6_addr32[0] | a->s6_addr32[1] | |
389 | (a->s6_addr32[2] ^ htonl(0x0000ffff))) == 0); | 389 | (a->s6_addr32[2] ^ htonl(0x0000ffff))) == 0; |
390 | } | 390 | } |
391 | 391 | ||
392 | /* | 392 | /* |
@@ -395,8 +395,7 @@ static inline int ipv6_addr_v4mapped(const struct in6_addr *a) | |||
395 | */ | 395 | */ |
396 | static inline int ipv6_addr_orchid(const struct in6_addr *a) | 396 | static inline int ipv6_addr_orchid(const struct in6_addr *a) |
397 | { | 397 | { |
398 | return ((a->s6_addr32[0] & htonl(0xfffffff0)) | 398 | return (a->s6_addr32[0] & htonl(0xfffffff0)) == htonl(0x20010010); |
399 | == htonl(0x20010010)); | ||
400 | } | 399 | } |
401 | 400 | ||
402 | static inline void ipv6_addr_set_v4mapped(const __be32 addr, | 401 | static inline void ipv6_addr_set_v4mapped(const __be32 addr, |
@@ -441,7 +440,7 @@ static inline int __ipv6_addr_diff(const void *token1, const void *token2, int a | |||
441 | * if returned value is greater than prefix length. | 440 | * if returned value is greater than prefix length. |
442 | * --ANK (980803) | 441 | * --ANK (980803) |
443 | */ | 442 | */ |
444 | return (addrlen << 5); | 443 | return addrlen << 5; |
445 | } | 444 | } |
446 | 445 | ||
447 | static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_addr *a2) | 446 | static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_addr *a2) |
diff --git a/include/net/irda/irlap.h b/include/net/irda/irlap.h index 9d0c78ea92f5..17fcd964f9d9 100644 --- a/include/net/irda/irlap.h +++ b/include/net/irda/irlap.h | |||
@@ -282,7 +282,7 @@ static inline int irlap_is_primary(struct irlap_cb *self) | |||
282 | default: | 282 | default: |
283 | ret = -1; | 283 | ret = -1; |
284 | } | 284 | } |
285 | return(ret); | 285 | return ret; |
286 | } | 286 | } |
287 | 287 | ||
288 | /* Clear a pending IrLAP disconnect. - Jean II */ | 288 | /* Clear a pending IrLAP disconnect. - Jean II */ |
diff --git a/include/net/irda/irlmp.h b/include/net/irda/irlmp.h index 3ffc1d0f93d6..fff11b7fe8a4 100644 --- a/include/net/irda/irlmp.h +++ b/include/net/irda/irlmp.h | |||
@@ -274,7 +274,7 @@ static inline int irlmp_lap_tx_queue_full(struct lsap_cb *self) | |||
274 | if (self->lap->irlap == NULL) | 274 | if (self->lap->irlap == NULL) |
275 | return 0; | 275 | return 0; |
276 | 276 | ||
277 | return(IRLAP_GET_TX_QUEUE_LEN(self->lap->irlap) >= LAP_HIGH_THRESHOLD); | 277 | return IRLAP_GET_TX_QUEUE_LEN(self->lap->irlap) >= LAP_HIGH_THRESHOLD; |
278 | } | 278 | } |
279 | 279 | ||
280 | /* After doing a irlmp_dup(), this get one of the two socket back into | 280 | /* After doing a irlmp_dup(), this get one of the two socket back into |
diff --git a/include/net/irda/irttp.h b/include/net/irda/irttp.h index 11aee7a2972a..af4b87721d13 100644 --- a/include/net/irda/irttp.h +++ b/include/net/irda/irttp.h | |||
@@ -204,7 +204,7 @@ static inline int irttp_is_primary(struct tsap_cb *self) | |||
204 | (self->lsap->lap == NULL) || | 204 | (self->lsap->lap == NULL) || |
205 | (self->lsap->lap->irlap == NULL)) | 205 | (self->lsap->lap->irlap == NULL)) |
206 | return -2; | 206 | return -2; |
207 | return(irlap_is_primary(self->lsap->lap->irlap)); | 207 | return irlap_is_primary(self->lsap->lap->irlap); |
208 | } | 208 | } |
209 | 209 | ||
210 | #endif /* IRTTP_H */ | 210 | #endif /* IRTTP_H */ |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 3c8728aaab4e..eda8808fdacd 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -601,7 +601,7 @@ static inline u32 qdisc_l2t(struct qdisc_rate_table* rtab, unsigned int pktlen) | |||
601 | slot = 0; | 601 | slot = 0; |
602 | slot >>= rtab->rate.cell_log; | 602 | slot >>= rtab->rate.cell_log; |
603 | if (slot > 255) | 603 | if (slot > 255) |
604 | return (rtab->data[255]*(slot >> 8) + rtab->data[slot & 0xFF]); | 604 | return rtab->data[255]*(slot >> 8) + rtab->data[slot & 0xFF]; |
605 | return rtab->data[slot]; | 605 | return rtab->data[slot]; |
606 | } | 606 | } |
607 | 607 | ||
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 2cb3980b1616..505845ddb0be 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -405,7 +405,7 @@ static inline void sctp_v6_del_protocol(void) { return; } | |||
405 | /* Map an association to an assoc_id. */ | 405 | /* Map an association to an assoc_id. */ |
406 | static inline sctp_assoc_t sctp_assoc2id(const struct sctp_association *asoc) | 406 | static inline sctp_assoc_t sctp_assoc2id(const struct sctp_association *asoc) |
407 | { | 407 | { |
408 | return (asoc?asoc->assoc_id:0); | 408 | return asoc ? asoc->assoc_id : 0; |
409 | } | 409 | } |
410 | 410 | ||
411 | /* Look up the association by its id. */ | 411 | /* Look up the association by its id. */ |
@@ -473,7 +473,7 @@ static inline void sctp_skb_set_owner_r(struct sk_buff *skb, struct sock *sk) | |||
473 | /* Tests if the list has one and only one entry. */ | 473 | /* Tests if the list has one and only one entry. */ |
474 | static inline int sctp_list_single_entry(struct list_head *head) | 474 | static inline int sctp_list_single_entry(struct list_head *head) |
475 | { | 475 | { |
476 | return ((head->next != head) && (head->next == head->prev)); | 476 | return (head->next != head) && (head->next == head->prev); |
477 | } | 477 | } |
478 | 478 | ||
479 | /* Generate a random jitter in the range of -50% ~ +50% of input RTO. */ | 479 | /* Generate a random jitter in the range of -50% ~ +50% of input RTO. */ |
@@ -631,13 +631,13 @@ static inline int sctp_sanity_check(void) | |||
631 | /* This is the hash function for the SCTP port hash table. */ | 631 | /* This is the hash function for the SCTP port hash table. */ |
632 | static inline int sctp_phashfn(__u16 lport) | 632 | static inline int sctp_phashfn(__u16 lport) |
633 | { | 633 | { |
634 | return (lport & (sctp_port_hashsize - 1)); | 634 | return lport & (sctp_port_hashsize - 1); |
635 | } | 635 | } |
636 | 636 | ||
637 | /* This is the hash function for the endpoint hash table. */ | 637 | /* This is the hash function for the endpoint hash table. */ |
638 | static inline int sctp_ep_hashfn(__u16 lport) | 638 | static inline int sctp_ep_hashfn(__u16 lport) |
639 | { | 639 | { |
640 | return (lport & (sctp_ep_hashsize - 1)); | 640 | return lport & (sctp_ep_hashsize - 1); |
641 | } | 641 | } |
642 | 642 | ||
643 | /* This is the hash function for the association hash table. */ | 643 | /* This is the hash function for the association hash table. */ |
@@ -645,7 +645,7 @@ static inline int sctp_assoc_hashfn(__u16 lport, __u16 rport) | |||
645 | { | 645 | { |
646 | int h = (lport << 16) + rport; | 646 | int h = (lport << 16) + rport; |
647 | h ^= h>>8; | 647 | h ^= h>>8; |
648 | return (h & (sctp_assoc_hashsize - 1)); | 648 | return h & (sctp_assoc_hashsize - 1); |
649 | } | 649 | } |
650 | 650 | ||
651 | /* This is the hash function for the association hash table. This is | 651 | /* This is the hash function for the association hash table. This is |
@@ -656,7 +656,7 @@ static inline int sctp_vtag_hashfn(__u16 lport, __u16 rport, __u32 vtag) | |||
656 | { | 656 | { |
657 | int h = (lport << 16) + rport; | 657 | int h = (lport << 16) + rport; |
658 | h ^= vtag; | 658 | h ^= vtag; |
659 | return (h & (sctp_assoc_hashsize-1)); | 659 | return h & (sctp_assoc_hashsize - 1); |
660 | } | 660 | } |
661 | 661 | ||
662 | #define sctp_for_each_hentry(epb, node, head) \ | 662 | #define sctp_for_each_hentry(epb, node, head) \ |
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 4088c89a9055..9352d12f02de 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h | |||
@@ -345,12 +345,12 @@ enum { | |||
345 | 345 | ||
346 | static inline int TSN_lt(__u32 s, __u32 t) | 346 | static inline int TSN_lt(__u32 s, __u32 t) |
347 | { | 347 | { |
348 | return (((s) - (t)) & TSN_SIGN_BIT); | 348 | return ((s) - (t)) & TSN_SIGN_BIT; |
349 | } | 349 | } |
350 | 350 | ||
351 | static inline int TSN_lte(__u32 s, __u32 t) | 351 | static inline int TSN_lte(__u32 s, __u32 t) |
352 | { | 352 | { |
353 | return (((s) == (t)) || (((s) - (t)) & TSN_SIGN_BIT)); | 353 | return ((s) == (t)) || (((s) - (t)) & TSN_SIGN_BIT); |
354 | } | 354 | } |
355 | 355 | ||
356 | /* Compare two SSNs */ | 356 | /* Compare two SSNs */ |
@@ -369,12 +369,12 @@ enum { | |||
369 | 369 | ||
370 | static inline int SSN_lt(__u16 s, __u16 t) | 370 | static inline int SSN_lt(__u16 s, __u16 t) |
371 | { | 371 | { |
372 | return (((s) - (t)) & SSN_SIGN_BIT); | 372 | return ((s) - (t)) & SSN_SIGN_BIT; |
373 | } | 373 | } |
374 | 374 | ||
375 | static inline int SSN_lte(__u16 s, __u16 t) | 375 | static inline int SSN_lte(__u16 s, __u16 t) |
376 | { | 376 | { |
377 | return (((s) == (t)) || (((s) - (t)) & SSN_SIGN_BIT)); | 377 | return ((s) == (t)) || (((s) - (t)) & SSN_SIGN_BIT); |
378 | } | 378 | } |
379 | 379 | ||
380 | /* | 380 | /* |
@@ -388,7 +388,7 @@ enum { | |||
388 | 388 | ||
389 | static inline int ADDIP_SERIAL_gte(__u16 s, __u16 t) | 389 | static inline int ADDIP_SERIAL_gte(__u16 s, __u16 t) |
390 | { | 390 | { |
391 | return (((s) == (t)) || (((t) - (s)) & ADDIP_SERIAL_SIGN_BIT)); | 391 | return ((s) == (t)) || (((t) - (s)) & ADDIP_SERIAL_SIGN_BIT); |
392 | } | 392 | } |
393 | 393 | ||
394 | /* Check VTAG of the packet matches the sender's own tag. */ | 394 | /* Check VTAG of the packet matches the sender's own tag. */ |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index f9e7473613bd..69fef4fb79c0 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -847,7 +847,7 @@ void sctp_packet_free(struct sctp_packet *); | |||
847 | 847 | ||
848 | static inline int sctp_packet_empty(struct sctp_packet *packet) | 848 | static inline int sctp_packet_empty(struct sctp_packet *packet) |
849 | { | 849 | { |
850 | return (packet->size == packet->overhead); | 850 | return packet->size == packet->overhead; |
851 | } | 851 | } |
852 | 852 | ||
853 | /* This represents a remote transport address. | 853 | /* This represents a remote transport address. |
diff --git a/include/net/sctp/tsnmap.h b/include/net/sctp/tsnmap.h index 4aabc5a96cf6..e7728bc14ccf 100644 --- a/include/net/sctp/tsnmap.h +++ b/include/net/sctp/tsnmap.h | |||
@@ -157,7 +157,7 @@ __u16 sctp_tsnmap_pending(struct sctp_tsnmap *map); | |||
157 | /* Is there a gap in the TSN map? */ | 157 | /* Is there a gap in the TSN map? */ |
158 | static inline int sctp_tsnmap_has_gap(const struct sctp_tsnmap *map) | 158 | static inline int sctp_tsnmap_has_gap(const struct sctp_tsnmap *map) |
159 | { | 159 | { |
160 | return (map->cumulative_tsn_ack_point != map->max_tsn_seen); | 160 | return map->cumulative_tsn_ack_point != map->max_tsn_seen; |
161 | } | 161 | } |
162 | 162 | ||
163 | /* Mark a duplicate TSN. Note: limit the storage of duplicate TSN | 163 | /* Mark a duplicate TSN. Note: limit the storage of duplicate TSN |
diff --git a/include/net/tipc/tipc_msg.h b/include/net/tipc/tipc_msg.h index 2e159a812f83..ffe50b4e7b93 100644 --- a/include/net/tipc/tipc_msg.h +++ b/include/net/tipc/tipc_msg.h | |||
@@ -107,7 +107,7 @@ static inline u32 msg_hdr_sz(struct tipc_msg *m) | |||
107 | 107 | ||
108 | static inline int msg_short(struct tipc_msg *m) | 108 | static inline int msg_short(struct tipc_msg *m) |
109 | { | 109 | { |
110 | return (msg_hdr_sz(m) == 24); | 110 | return msg_hdr_sz(m) == 24; |
111 | } | 111 | } |
112 | 112 | ||
113 | static inline u32 msg_size(struct tipc_msg *m) | 113 | static inline u32 msg_size(struct tipc_msg *m) |
@@ -117,7 +117,7 @@ static inline u32 msg_size(struct tipc_msg *m) | |||
117 | 117 | ||
118 | static inline u32 msg_data_sz(struct tipc_msg *m) | 118 | static inline u32 msg_data_sz(struct tipc_msg *m) |
119 | { | 119 | { |
120 | return (msg_size(m) - msg_hdr_sz(m)); | 120 | return msg_size(m) - msg_hdr_sz(m); |
121 | } | 121 | } |
122 | 122 | ||
123 | static inline unchar *msg_data(struct tipc_msg *m) | 123 | static inline unchar *msg_data(struct tipc_msg *m) |
@@ -132,17 +132,17 @@ static inline u32 msg_type(struct tipc_msg *m) | |||
132 | 132 | ||
133 | static inline u32 msg_named(struct tipc_msg *m) | 133 | static inline u32 msg_named(struct tipc_msg *m) |
134 | { | 134 | { |
135 | return (msg_type(m) == TIPC_NAMED_MSG); | 135 | return msg_type(m) == TIPC_NAMED_MSG; |
136 | } | 136 | } |
137 | 137 | ||
138 | static inline u32 msg_mcast(struct tipc_msg *m) | 138 | static inline u32 msg_mcast(struct tipc_msg *m) |
139 | { | 139 | { |
140 | return (msg_type(m) == TIPC_MCAST_MSG); | 140 | return msg_type(m) == TIPC_MCAST_MSG; |
141 | } | 141 | } |
142 | 142 | ||
143 | static inline u32 msg_connected(struct tipc_msg *m) | 143 | static inline u32 msg_connected(struct tipc_msg *m) |
144 | { | 144 | { |
145 | return (msg_type(m) == TIPC_CONN_MSG); | 145 | return msg_type(m) == TIPC_CONN_MSG; |
146 | } | 146 | } |
147 | 147 | ||
148 | static inline u32 msg_errcode(struct tipc_msg *m) | 148 | static inline u32 msg_errcode(struct tipc_msg *m) |
diff --git a/net/802/fc.c b/net/802/fc.c index 34cf1ee014b8..1e49f2d4ea96 100644 --- a/net/802/fc.c +++ b/net/802/fc.c | |||
@@ -70,7 +70,7 @@ static int fc_header(struct sk_buff *skb, struct net_device *dev, | |||
70 | if(daddr) | 70 | if(daddr) |
71 | { | 71 | { |
72 | memcpy(fch->daddr,daddr,dev->addr_len); | 72 | memcpy(fch->daddr,daddr,dev->addr_len); |
73 | return(hdr_len); | 73 | return hdr_len; |
74 | } | 74 | } |
75 | return -hdr_len; | 75 | return -hdr_len; |
76 | } | 76 | } |
diff --git a/net/802/fddi.c b/net/802/fddi.c index 3ef0ab0a543a..94b3ad08f39a 100644 --- a/net/802/fddi.c +++ b/net/802/fddi.c | |||
@@ -82,10 +82,10 @@ static int fddi_header(struct sk_buff *skb, struct net_device *dev, | |||
82 | if (daddr != NULL) | 82 | if (daddr != NULL) |
83 | { | 83 | { |
84 | memcpy(fddi->daddr, daddr, dev->addr_len); | 84 | memcpy(fddi->daddr, daddr, dev->addr_len); |
85 | return(hl); | 85 | return hl; |
86 | } | 86 | } |
87 | 87 | ||
88 | return(-hl); | 88 | return -hl; |
89 | } | 89 | } |
90 | 90 | ||
91 | 91 | ||
@@ -108,7 +108,7 @@ static int fddi_rebuild_header(struct sk_buff *skb) | |||
108 | { | 108 | { |
109 | printk("%s: Don't know how to resolve type %04X addresses.\n", | 109 | printk("%s: Don't know how to resolve type %04X addresses.\n", |
110 | skb->dev->name, ntohs(fddi->hdr.llc_snap.ethertype)); | 110 | skb->dev->name, ntohs(fddi->hdr.llc_snap.ethertype)); |
111 | return(0); | 111 | return 0; |
112 | } | 112 | } |
113 | } | 113 | } |
114 | 114 | ||
@@ -162,7 +162,7 @@ __be16 fddi_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
162 | 162 | ||
163 | /* Assume 802.2 SNAP frames, for now */ | 163 | /* Assume 802.2 SNAP frames, for now */ |
164 | 164 | ||
165 | return(type); | 165 | return type; |
166 | } | 166 | } |
167 | 167 | ||
168 | EXPORT_SYMBOL(fddi_type_trans); | 168 | EXPORT_SYMBOL(fddi_type_trans); |
@@ -170,9 +170,9 @@ EXPORT_SYMBOL(fddi_type_trans); | |||
170 | int fddi_change_mtu(struct net_device *dev, int new_mtu) | 170 | int fddi_change_mtu(struct net_device *dev, int new_mtu) |
171 | { | 171 | { |
172 | if ((new_mtu < FDDI_K_SNAP_HLEN) || (new_mtu > FDDI_K_SNAP_DLEN)) | 172 | if ((new_mtu < FDDI_K_SNAP_HLEN) || (new_mtu > FDDI_K_SNAP_DLEN)) |
173 | return(-EINVAL); | 173 | return -EINVAL; |
174 | dev->mtu = new_mtu; | 174 | dev->mtu = new_mtu; |
175 | return(0); | 175 | return 0; |
176 | } | 176 | } |
177 | EXPORT_SYMBOL(fddi_change_mtu); | 177 | EXPORT_SYMBOL(fddi_change_mtu); |
178 | 178 | ||
diff --git a/net/802/hippi.c b/net/802/hippi.c index cd3e8e929529..91aca8780fd0 100644 --- a/net/802/hippi.c +++ b/net/802/hippi.c | |||
@@ -152,7 +152,7 @@ int hippi_change_mtu(struct net_device *dev, int new_mtu) | |||
152 | if ((new_mtu < 68) || (new_mtu > 65280)) | 152 | if ((new_mtu < 68) || (new_mtu > 65280)) |
153 | return -EINVAL; | 153 | return -EINVAL; |
154 | dev->mtu = new_mtu; | 154 | dev->mtu = new_mtu; |
155 | return(0); | 155 | return 0; |
156 | } | 156 | } |
157 | EXPORT_SYMBOL(hippi_change_mtu); | 157 | EXPORT_SYMBOL(hippi_change_mtu); |
158 | 158 | ||
diff --git a/net/802/tr.c b/net/802/tr.c index 1c6e596074df..5e20cf8a074b 100644 --- a/net/802/tr.c +++ b/net/802/tr.c | |||
@@ -145,7 +145,7 @@ static int tr_header(struct sk_buff *skb, struct net_device *dev, | |||
145 | { | 145 | { |
146 | memcpy(trh->daddr,daddr,dev->addr_len); | 146 | memcpy(trh->daddr,daddr,dev->addr_len); |
147 | tr_source_route(skb, trh, dev); | 147 | tr_source_route(skb, trh, dev); |
148 | return(hdr_len); | 148 | return hdr_len; |
149 | } | 149 | } |
150 | 150 | ||
151 | return -hdr_len; | 151 | return -hdr_len; |
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c index 889f4ac4459a..0eb486d342dc 100644 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c | |||
@@ -27,7 +27,7 @@ int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, | |||
27 | else if (vlan_id) | 27 | else if (vlan_id) |
28 | goto drop; | 28 | goto drop; |
29 | 29 | ||
30 | return (polling ? netif_receive_skb(skb) : netif_rx(skb)); | 30 | return polling ? netif_receive_skb(skb) : netif_rx(skb); |
31 | 31 | ||
32 | drop: | 32 | drop: |
33 | dev_kfree_skb_any(skb); | 33 | dev_kfree_skb_any(skb); |
diff --git a/net/9p/client.c b/net/9p/client.c index dc6f2f26d023..f34b9f510818 100644 --- a/net/9p/client.c +++ b/net/9p/client.c | |||
@@ -61,13 +61,13 @@ static const match_table_t tokens = { | |||
61 | 61 | ||
62 | inline int p9_is_proto_dotl(struct p9_client *clnt) | 62 | inline int p9_is_proto_dotl(struct p9_client *clnt) |
63 | { | 63 | { |
64 | return (clnt->proto_version == p9_proto_2000L); | 64 | return clnt->proto_version == p9_proto_2000L; |
65 | } | 65 | } |
66 | EXPORT_SYMBOL(p9_is_proto_dotl); | 66 | EXPORT_SYMBOL(p9_is_proto_dotl); |
67 | 67 | ||
68 | inline int p9_is_proto_dotu(struct p9_client *clnt) | 68 | inline int p9_is_proto_dotu(struct p9_client *clnt) |
69 | { | 69 | { |
70 | return (clnt->proto_version == p9_proto_2000u); | 70 | return clnt->proto_version == p9_proto_2000u; |
71 | } | 71 | } |
72 | EXPORT_SYMBOL(p9_is_proto_dotu); | 72 | EXPORT_SYMBOL(p9_is_proto_dotu); |
73 | 73 | ||
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 7dca91bb8c57..15ea84ba344e 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -179,13 +179,13 @@ static unsigned char rfcomm_crc_table[256] = { | |||
179 | /* FCS on 2 bytes */ | 179 | /* FCS on 2 bytes */ |
180 | static inline u8 __fcs(u8 *data) | 180 | static inline u8 __fcs(u8 *data) |
181 | { | 181 | { |
182 | return (0xff - __crc(data)); | 182 | return 0xff - __crc(data); |
183 | } | 183 | } |
184 | 184 | ||
185 | /* FCS on 3 bytes */ | 185 | /* FCS on 3 bytes */ |
186 | static inline u8 __fcs2(u8 *data) | 186 | static inline u8 __fcs2(u8 *data) |
187 | { | 187 | { |
188 | return (0xff - rfcomm_crc_table[__crc(data) ^ data[2]]); | 188 | return 0xff - rfcomm_crc_table[__crc(data) ^ data[2]]; |
189 | } | 189 | } |
190 | 190 | ||
191 | /* Check FCS */ | 191 | /* Check FCS */ |
diff --git a/net/core/flow.c b/net/core/flow.c index b143b86b1f2a..127c8a7ffd61 100644 --- a/net/core/flow.c +++ b/net/core/flow.c | |||
@@ -176,8 +176,8 @@ static u32 flow_hash_code(struct flow_cache *fc, | |||
176 | { | 176 | { |
177 | u32 *k = (u32 *) key; | 177 | u32 *k = (u32 *) key; |
178 | 178 | ||
179 | return (jhash2(k, (sizeof(*key) / sizeof(u32)), fcp->hash_rnd) | 179 | return jhash2(k, (sizeof(*key) / sizeof(u32)), fcp->hash_rnd) |
180 | & (flow_cache_hash_size(fc) - 1)); | 180 | & (flow_cache_hash_size(fc) - 1); |
181 | } | 181 | } |
182 | 182 | ||
183 | typedef unsigned long flow_compare_t; | 183 | typedef unsigned long flow_compare_t; |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index a4e0a7482c2b..96b1a749abb4 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -122,7 +122,7 @@ static void neigh_cleanup_and_release(struct neighbour *neigh) | |||
122 | 122 | ||
123 | unsigned long neigh_rand_reach_time(unsigned long base) | 123 | unsigned long neigh_rand_reach_time(unsigned long base) |
124 | { | 124 | { |
125 | return (base ? (net_random() % base) + (base >> 1) : 0); | 125 | return base ? (net_random() % base) + (base >> 1) : 0; |
126 | } | 126 | } |
127 | EXPORT_SYMBOL(neigh_rand_reach_time); | 127 | EXPORT_SYMBOL(neigh_rand_reach_time); |
128 | 128 | ||
@@ -766,9 +766,9 @@ next_elt: | |||
766 | static __inline__ int neigh_max_probes(struct neighbour *n) | 766 | static __inline__ int neigh_max_probes(struct neighbour *n) |
767 | { | 767 | { |
768 | struct neigh_parms *p = n->parms; | 768 | struct neigh_parms *p = n->parms; |
769 | return (n->nud_state & NUD_PROBE ? | 769 | return (n->nud_state & NUD_PROBE) ? |
770 | p->ucast_probes : | 770 | p->ucast_probes : |
771 | p->ucast_probes + p->app_probes + p->mcast_probes); | 771 | p->ucast_probes + p->app_probes + p->mcast_probes; |
772 | } | 772 | } |
773 | 773 | ||
774 | static void neigh_invalidate(struct neighbour *neigh) | 774 | static void neigh_invalidate(struct neighbour *neigh) |
diff --git a/net/core/utils.c b/net/core/utils.c index ec6bb322f372..5fea0ab21902 100644 --- a/net/core/utils.c +++ b/net/core/utils.c | |||
@@ -75,7 +75,7 @@ __be32 in_aton(const char *str) | |||
75 | str++; | 75 | str++; |
76 | } | 76 | } |
77 | } | 77 | } |
78 | return(htonl(l)); | 78 | return htonl(l); |
79 | } | 79 | } |
80 | EXPORT_SYMBOL(in_aton); | 80 | EXPORT_SYMBOL(in_aton); |
81 | 81 | ||
diff --git a/net/dccp/ccids/lib/loss_interval.c b/net/dccp/ccids/lib/loss_interval.c index 8fc3cbf79071..497723c4d4bb 100644 --- a/net/dccp/ccids/lib/loss_interval.c +++ b/net/dccp/ccids/lib/loss_interval.c | |||
@@ -116,7 +116,7 @@ u8 tfrc_lh_update_i_mean(struct tfrc_loss_hist *lh, struct sk_buff *skb) | |||
116 | cur->li_length = len; | 116 | cur->li_length = len; |
117 | tfrc_lh_calc_i_mean(lh); | 117 | tfrc_lh_calc_i_mean(lh); |
118 | 118 | ||
119 | return (lh->i_mean < old_i_mean); | 119 | return lh->i_mean < old_i_mean; |
120 | } | 120 | } |
121 | 121 | ||
122 | /* Determine if `new_loss' does begin a new loss interval [RFC 4342, 10.2] */ | 122 | /* Determine if `new_loss' does begin a new loss interval [RFC 4342, 10.2] */ |
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c index baa98fb83552..f8c1ae4b41f0 100644 --- a/net/econet/af_econet.c +++ b/net/econet/af_econet.c | |||
@@ -392,7 +392,7 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
392 | dev_queue_xmit(skb); | 392 | dev_queue_xmit(skb); |
393 | dev_put(dev); | 393 | dev_put(dev); |
394 | mutex_unlock(&econet_mutex); | 394 | mutex_unlock(&econet_mutex); |
395 | return(len); | 395 | return len; |
396 | 396 | ||
397 | out_free: | 397 | out_free: |
398 | kfree_skb(skb); | 398 | kfree_skb(skb); |
@@ -637,7 +637,7 @@ static int econet_create(struct net *net, struct socket *sock, int protocol, | |||
637 | eo->num = protocol; | 637 | eo->num = protocol; |
638 | 638 | ||
639 | econet_insert_socket(&econet_sklist, sk); | 639 | econet_insert_socket(&econet_sklist, sk); |
640 | return(0); | 640 | return 0; |
641 | out: | 641 | out: |
642 | return err; | 642 | return err; |
643 | } | 643 | } |
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c index 85e7b4551326..f00ef2f1d814 100644 --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c | |||
@@ -387,6 +387,6 @@ ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len) | |||
387 | 387 | ||
388 | l = _format_mac_addr(buf, PAGE_SIZE, addr, len); | 388 | l = _format_mac_addr(buf, PAGE_SIZE, addr, len); |
389 | l += scnprintf(buf + l, PAGE_SIZE - l, "\n"); | 389 | l += scnprintf(buf + l, PAGE_SIZE - l, "\n"); |
390 | return ((ssize_t) l); | 390 | return (ssize_t)l; |
391 | } | 391 | } |
392 | EXPORT_SYMBOL(sysfs_format_mac); | 392 | EXPORT_SYMBOL(sysfs_format_mac); |
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index dcfe7e961c10..4083c186fd30 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -567,7 +567,7 @@ static inline int arp_fwd_proxy(struct in_device *in_dev, | |||
567 | if (out_dev) | 567 | if (out_dev) |
568 | omi = IN_DEV_MEDIUM_ID(out_dev); | 568 | omi = IN_DEV_MEDIUM_ID(out_dev); |
569 | 569 | ||
570 | return (omi != imi && omi != -1); | 570 | return omi != imi && omi != -1; |
571 | } | 571 | } |
572 | 572 | ||
573 | /* | 573 | /* |
diff --git a/net/ipv4/datagram.c b/net/ipv4/datagram.c index 721a8a37b45c..174be6caa5c8 100644 --- a/net/ipv4/datagram.c +++ b/net/ipv4/datagram.c | |||
@@ -73,6 +73,6 @@ int ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) | |||
73 | inet->inet_id = jiffies; | 73 | inet->inet_id = jiffies; |
74 | 74 | ||
75 | sk_dst_set(sk, &rt->dst); | 75 | sk_dst_set(sk, &rt->dst); |
76 | return(0); | 76 | return 0; |
77 | } | 77 | } |
78 | EXPORT_SYMBOL(ip4_datagram_connect); | 78 | EXPORT_SYMBOL(ip4_datagram_connect); |
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index e5fa2ddce320..ba8042665849 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c | |||
@@ -425,7 +425,7 @@ static int inet_diag_bc_run(const void *bc, int len, | |||
425 | bc += op->no; | 425 | bc += op->no; |
426 | } | 426 | } |
427 | } | 427 | } |
428 | return (len == 0); | 428 | return len == 0; |
429 | } | 429 | } |
430 | 430 | ||
431 | static int valid_cc(const void *bc, int len, int cc) | 431 | static int valid_cc(const void *bc, int len, int cc) |
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index f4dc879e258e..168440834ade 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c | |||
@@ -116,11 +116,11 @@ static int ip4_frag_match(struct inet_frag_queue *q, void *a) | |||
116 | struct ip4_create_arg *arg = a; | 116 | struct ip4_create_arg *arg = a; |
117 | 117 | ||
118 | qp = container_of(q, struct ipq, q); | 118 | qp = container_of(q, struct ipq, q); |
119 | return (qp->id == arg->iph->id && | 119 | return qp->id == arg->iph->id && |
120 | qp->saddr == arg->iph->saddr && | 120 | qp->saddr == arg->iph->saddr && |
121 | qp->daddr == arg->iph->daddr && | 121 | qp->daddr == arg->iph->daddr && |
122 | qp->protocol == arg->iph->protocol && | 122 | qp->protocol == arg->iph->protocol && |
123 | qp->user == arg->user); | 123 | qp->user == arg->user; |
124 | } | 124 | } |
125 | 125 | ||
126 | /* Memory Tracking Functions. */ | 126 | /* Memory Tracking Functions. */ |
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 714b6a80361d..0967d02fefd8 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -659,7 +659,7 @@ drop: | |||
659 | rcu_read_unlock(); | 659 | rcu_read_unlock(); |
660 | drop_nolock: | 660 | drop_nolock: |
661 | kfree_skb(skb); | 661 | kfree_skb(skb); |
662 | return(0); | 662 | return 0; |
663 | } | 663 | } |
664 | 664 | ||
665 | static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | 665 | static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) |
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index e8f4f9a57f12..8b642f152468 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c | |||
@@ -72,7 +72,7 @@ static inline int arp_devaddr_compare(const struct arpt_devaddr_info *ap, | |||
72 | for (i = 0; i < len; i++) | 72 | for (i = 0; i < len; i++) |
73 | ret |= (hdr_addr[i] ^ ap->addr[i]) & ap->mask[i]; | 73 | ret |= (hdr_addr[i] ^ ap->addr[i]) & ap->mask[i]; |
74 | 74 | ||
75 | return (ret != 0); | 75 | return ret != 0; |
76 | } | 76 | } |
77 | 77 | ||
78 | /* | 78 | /* |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index e24d48dd99d3..ae1d4a41f1c6 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -2791,7 +2791,7 @@ static int ipv4_dst_blackhole(struct net *net, struct rtable **rp, struct flowi | |||
2791 | 2791 | ||
2792 | dst_release(&(*rp)->dst); | 2792 | dst_release(&(*rp)->dst); |
2793 | *rp = rt; | 2793 | *rp = rt; |
2794 | return (rt ? 0 : -ENOMEM); | 2794 | return rt ? 0 : -ENOMEM; |
2795 | } | 2795 | } |
2796 | 2796 | ||
2797 | int ip_route_output_flow(struct net *net, struct rtable **rp, struct flowi *flp, | 2797 | int ip_route_output_flow(struct net *net, struct rtable **rp, struct flowi *flp, |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 1bc87a05c734..51966b3f9719 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -2301,7 +2301,7 @@ static inline int tcp_dupack_heuristics(struct tcp_sock *tp) | |||
2301 | 2301 | ||
2302 | static inline int tcp_skb_timedout(struct sock *sk, struct sk_buff *skb) | 2302 | static inline int tcp_skb_timedout(struct sock *sk, struct sk_buff *skb) |
2303 | { | 2303 | { |
2304 | return (tcp_time_stamp - TCP_SKB_CB(skb)->when > inet_csk(sk)->icsk_rto); | 2304 | return tcp_time_stamp - TCP_SKB_CB(skb)->when > inet_csk(sk)->icsk_rto; |
2305 | } | 2305 | } |
2306 | 2306 | ||
2307 | static inline int tcp_head_timedout(struct sock *sk) | 2307 | static inline int tcp_head_timedout(struct sock *sk) |
@@ -3398,8 +3398,8 @@ static void tcp_ack_probe(struct sock *sk) | |||
3398 | 3398 | ||
3399 | static inline int tcp_ack_is_dubious(const struct sock *sk, const int flag) | 3399 | static inline int tcp_ack_is_dubious(const struct sock *sk, const int flag) |
3400 | { | 3400 | { |
3401 | return (!(flag & FLAG_NOT_DUP) || (flag & FLAG_CA_ALERT) || | 3401 | return !(flag & FLAG_NOT_DUP) || (flag & FLAG_CA_ALERT) || |
3402 | inet_csk(sk)->icsk_ca_state != TCP_CA_Open); | 3402 | inet_csk(sk)->icsk_ca_state != TCP_CA_Open; |
3403 | } | 3403 | } |
3404 | 3404 | ||
3405 | static inline int tcp_may_raise_cwnd(const struct sock *sk, const int flag) | 3405 | static inline int tcp_may_raise_cwnd(const struct sock *sk, const int flag) |
@@ -3416,9 +3416,9 @@ static inline int tcp_may_update_window(const struct tcp_sock *tp, | |||
3416 | const u32 ack, const u32 ack_seq, | 3416 | const u32 ack, const u32 ack_seq, |
3417 | const u32 nwin) | 3417 | const u32 nwin) |
3418 | { | 3418 | { |
3419 | return (after(ack, tp->snd_una) || | 3419 | return after(ack, tp->snd_una) || |
3420 | after(ack_seq, tp->snd_wl1) || | 3420 | after(ack_seq, tp->snd_wl1) || |
3421 | (ack_seq == tp->snd_wl1 && nwin > tp->snd_wnd)); | 3421 | (ack_seq == tp->snd_wl1 && nwin > tp->snd_wnd); |
3422 | } | 3422 | } |
3423 | 3423 | ||
3424 | /* Update our send window. | 3424 | /* Update our send window. |
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index f25b56cb85cb..43cf901d7659 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c | |||
@@ -55,7 +55,7 @@ static __inline__ int tcp_in_window(u32 seq, u32 end_seq, u32 s_win, u32 e_win) | |||
55 | return 1; | 55 | return 1; |
56 | if (after(end_seq, s_win) && before(seq, e_win)) | 56 | if (after(end_seq, s_win) && before(seq, e_win)) |
57 | return 1; | 57 | return 1; |
58 | return (seq == e_win && seq == end_seq); | 58 | return seq == e_win && seq == end_seq; |
59 | } | 59 | } |
60 | 60 | ||
61 | /* | 61 | /* |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index ea09d2fd50c7..05b1ecf36763 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1370,9 +1370,9 @@ static inline int tcp_nagle_check(const struct tcp_sock *tp, | |||
1370 | const struct sk_buff *skb, | 1370 | const struct sk_buff *skb, |
1371 | unsigned mss_now, int nonagle) | 1371 | unsigned mss_now, int nonagle) |
1372 | { | 1372 | { |
1373 | return (skb->len < mss_now && | 1373 | return skb->len < mss_now && |
1374 | ((nonagle & TCP_NAGLE_CORK) || | 1374 | ((nonagle & TCP_NAGLE_CORK) || |
1375 | (!nonagle && tp->packets_out && tcp_minshall_check(tp)))); | 1375 | (!nonagle && tp->packets_out && tcp_minshall_check(tp))); |
1376 | } | 1376 | } |
1377 | 1377 | ||
1378 | /* Return non-zero if the Nagle test allows this packet to be | 1378 | /* Return non-zero if the Nagle test allows this packet to be |
@@ -1443,10 +1443,10 @@ int tcp_may_send_now(struct sock *sk) | |||
1443 | struct tcp_sock *tp = tcp_sk(sk); | 1443 | struct tcp_sock *tp = tcp_sk(sk); |
1444 | struct sk_buff *skb = tcp_send_head(sk); | 1444 | struct sk_buff *skb = tcp_send_head(sk); |
1445 | 1445 | ||
1446 | return (skb && | 1446 | return skb && |
1447 | tcp_snd_test(sk, skb, tcp_current_mss(sk), | 1447 | tcp_snd_test(sk, skb, tcp_current_mss(sk), |
1448 | (tcp_skb_is_last(sk, skb) ? | 1448 | (tcp_skb_is_last(sk, skb) ? |
1449 | tp->nonagle : TCP_NAGLE_PUSH))); | 1449 | tp->nonagle : TCP_NAGLE_PUSH)); |
1450 | } | 1450 | } |
1451 | 1451 | ||
1452 | /* Trim TSO SKB to LEN bytes, put the remaining data into a new packet | 1452 | /* Trim TSO SKB to LEN bytes, put the remaining data into a new packet |
diff --git a/net/ipv4/tcp_westwood.c b/net/ipv4/tcp_westwood.c index 20151d6a6241..a534dda5456e 100644 --- a/net/ipv4/tcp_westwood.c +++ b/net/ipv4/tcp_westwood.c | |||
@@ -80,7 +80,7 @@ static void tcp_westwood_init(struct sock *sk) | |||
80 | */ | 80 | */ |
81 | static inline u32 westwood_do_filter(u32 a, u32 b) | 81 | static inline u32 westwood_do_filter(u32 a, u32 b) |
82 | { | 82 | { |
83 | return (((7 * a) + b) >> 3); | 83 | return ((7 * a) + b) >> 3; |
84 | } | 84 | } |
85 | 85 | ||
86 | static void westwood_filter(struct westwood *w, u32 delta) | 86 | static void westwood_filter(struct westwood *w, u32 delta) |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 5bc893e28008..89aa54394a08 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -243,7 +243,7 @@ static inline bool addrconf_qdisc_ok(const struct net_device *dev) | |||
243 | /* Check if a route is valid prefix route */ | 243 | /* Check if a route is valid prefix route */ |
244 | static inline int addrconf_is_prefix_route(const struct rt6_info *rt) | 244 | static inline int addrconf_is_prefix_route(const struct rt6_info *rt) |
245 | { | 245 | { |
246 | return ((rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0); | 246 | return (rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0; |
247 | } | 247 | } |
248 | 248 | ||
249 | static void addrconf_del_timer(struct inet6_ifaddr *ifp) | 249 | static void addrconf_del_timer(struct inet6_ifaddr *ifp) |
diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c index f0e774cea386..921dcf6c271a 100644 --- a/net/ipv6/addrlabel.c +++ b/net/ipv6/addrlabel.c | |||
@@ -513,10 +513,9 @@ static int ip6addrlbl_dump(struct sk_buff *skb, struct netlink_callback *cb) | |||
513 | 513 | ||
514 | static inline int ip6addrlbl_msgsize(void) | 514 | static inline int ip6addrlbl_msgsize(void) |
515 | { | 515 | { |
516 | return (NLMSG_ALIGN(sizeof(struct ifaddrlblmsg)) | 516 | return NLMSG_ALIGN(sizeof(struct ifaddrlblmsg)) |
517 | + nla_total_size(16) /* IFAL_ADDRESS */ | 517 | + nla_total_size(16) /* IFAL_ADDRESS */ |
518 | + nla_total_size(4) /* IFAL_LABEL */ | 518 | + nla_total_size(4); /* IFAL_LABEL */ |
519 | ); | ||
520 | } | 519 | } |
521 | 520 | ||
522 | static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr* nlh, | 521 | static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr* nlh, |
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 56b9bf2516f4..60220985bb80 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -467,7 +467,7 @@ int inet6_getname(struct socket *sock, struct sockaddr *uaddr, | |||
467 | if (ipv6_addr_type(&sin->sin6_addr) & IPV6_ADDR_LINKLOCAL) | 467 | if (ipv6_addr_type(&sin->sin6_addr) & IPV6_ADDR_LINKLOCAL) |
468 | sin->sin6_scope_id = sk->sk_bound_dev_if; | 468 | sin->sin6_scope_id = sk->sk_bound_dev_if; |
469 | *uaddr_len = sizeof(*sin); | 469 | *uaddr_len = sizeof(*sin); |
470 | return(0); | 470 | return 0; |
471 | } | 471 | } |
472 | 472 | ||
473 | EXPORT_SYMBOL(inet6_getname); | 473 | EXPORT_SYMBOL(inet6_getname); |
@@ -488,7 +488,7 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
488 | case SIOCADDRT: | 488 | case SIOCADDRT: |
489 | case SIOCDELRT: | 489 | case SIOCDELRT: |
490 | 490 | ||
491 | return(ipv6_route_ioctl(net, cmd, (void __user *)arg)); | 491 | return ipv6_route_ioctl(net, cmd, (void __user *)arg); |
492 | 492 | ||
493 | case SIOCSIFADDR: | 493 | case SIOCSIFADDR: |
494 | return addrconf_add_ifaddr(net, (void __user *) arg); | 494 | return addrconf_add_ifaddr(net, (void __user *) arg); |
@@ -502,7 +502,7 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
502 | return sk->sk_prot->ioctl(sk, cmd, arg); | 502 | return sk->sk_prot->ioctl(sk, cmd, arg); |
503 | } | 503 | } |
504 | /*NOTREACHED*/ | 504 | /*NOTREACHED*/ |
505 | return(0); | 505 | return 0; |
506 | } | 506 | } |
507 | 507 | ||
508 | EXPORT_SYMBOL(inet6_ioctl); | 508 | EXPORT_SYMBOL(inet6_ioctl); |
diff --git a/net/ipv6/exthdrs_core.c b/net/ipv6/exthdrs_core.c index e1caa5d526c2..14ed0a955b56 100644 --- a/net/ipv6/exthdrs_core.c +++ b/net/ipv6/exthdrs_core.c | |||
@@ -13,12 +13,12 @@ int ipv6_ext_hdr(u8 nexthdr) | |||
13 | /* | 13 | /* |
14 | * find out if nexthdr is an extension header or a protocol | 14 | * find out if nexthdr is an extension header or a protocol |
15 | */ | 15 | */ |
16 | return ( (nexthdr == NEXTHDR_HOP) || | 16 | return (nexthdr == NEXTHDR_HOP) || |
17 | (nexthdr == NEXTHDR_ROUTING) || | 17 | (nexthdr == NEXTHDR_ROUTING) || |
18 | (nexthdr == NEXTHDR_FRAGMENT) || | 18 | (nexthdr == NEXTHDR_FRAGMENT) || |
19 | (nexthdr == NEXTHDR_AUTH) || | 19 | (nexthdr == NEXTHDR_AUTH) || |
20 | (nexthdr == NEXTHDR_NONE) || | 20 | (nexthdr == NEXTHDR_NONE) || |
21 | (nexthdr == NEXTHDR_DEST) ); | 21 | (nexthdr == NEXTHDR_DEST); |
22 | } | 22 | } |
23 | 23 | ||
24 | /* | 24 | /* |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 1838927a2243..efbbbce68f9e 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -870,8 +870,8 @@ static inline int ip6_rt_check(struct rt6key *rt_key, | |||
870 | struct in6_addr *fl_addr, | 870 | struct in6_addr *fl_addr, |
871 | struct in6_addr *addr_cache) | 871 | struct in6_addr *addr_cache) |
872 | { | 872 | { |
873 | return ((rt_key->plen != 128 || !ipv6_addr_equal(fl_addr, &rt_key->addr)) && | 873 | return (rt_key->plen != 128 || !ipv6_addr_equal(fl_addr, &rt_key->addr)) && |
874 | (addr_cache == NULL || !ipv6_addr_equal(fl_addr, addr_cache))); | 874 | (addr_cache == NULL || !ipv6_addr_equal(fl_addr, addr_cache)); |
875 | } | 875 | } |
876 | 876 | ||
877 | static struct dst_entry *ip6_sk_dst_check(struct sock *sk, | 877 | static struct dst_entry *ip6_sk_dst_check(struct sock *sk, |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 69a0051cea67..b3dd844cd34f 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -228,12 +228,12 @@ static struct nd_opt_hdr *ndisc_next_option(struct nd_opt_hdr *cur, | |||
228 | do { | 228 | do { |
229 | cur = ((void *)cur) + (cur->nd_opt_len << 3); | 229 | cur = ((void *)cur) + (cur->nd_opt_len << 3); |
230 | } while(cur < end && cur->nd_opt_type != type); | 230 | } while(cur < end && cur->nd_opt_type != type); |
231 | return (cur <= end && cur->nd_opt_type == type ? cur : NULL); | 231 | return cur <= end && cur->nd_opt_type == type ? cur : NULL; |
232 | } | 232 | } |
233 | 233 | ||
234 | static inline int ndisc_is_useropt(struct nd_opt_hdr *opt) | 234 | static inline int ndisc_is_useropt(struct nd_opt_hdr *opt) |
235 | { | 235 | { |
236 | return (opt->nd_opt_type == ND_OPT_RDNSS); | 236 | return opt->nd_opt_type == ND_OPT_RDNSS; |
237 | } | 237 | } |
238 | 238 | ||
239 | static struct nd_opt_hdr *ndisc_next_useropt(struct nd_opt_hdr *cur, | 239 | static struct nd_opt_hdr *ndisc_next_useropt(struct nd_opt_hdr *cur, |
@@ -244,7 +244,7 @@ static struct nd_opt_hdr *ndisc_next_useropt(struct nd_opt_hdr *cur, | |||
244 | do { | 244 | do { |
245 | cur = ((void *)cur) + (cur->nd_opt_len << 3); | 245 | cur = ((void *)cur) + (cur->nd_opt_len << 3); |
246 | } while(cur < end && !ndisc_is_useropt(cur)); | 246 | } while(cur < end && !ndisc_is_useropt(cur)); |
247 | return (cur <= end && ndisc_is_useropt(cur) ? cur : NULL); | 247 | return cur <= end && ndisc_is_useropt(cur) ? cur : NULL; |
248 | } | 248 | } |
249 | 249 | ||
250 | static struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len, | 250 | static struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len, |
@@ -319,7 +319,7 @@ static inline u8 *ndisc_opt_addr_data(struct nd_opt_hdr *p, | |||
319 | int prepad = ndisc_addr_option_pad(dev->type); | 319 | int prepad = ndisc_addr_option_pad(dev->type); |
320 | if (lladdrlen != NDISC_OPT_SPACE(dev->addr_len + prepad)) | 320 | if (lladdrlen != NDISC_OPT_SPACE(dev->addr_len + prepad)) |
321 | return NULL; | 321 | return NULL; |
322 | return (lladdr + prepad); | 322 | return lladdr + prepad; |
323 | } | 323 | } |
324 | 324 | ||
325 | int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int dir) | 325 | int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int dir) |
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index 8e754be92c24..6b331e9b5706 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c | |||
@@ -82,13 +82,13 @@ EXPORT_SYMBOL_GPL(ip6t_alloc_initial_table); | |||
82 | int | 82 | int |
83 | ip6t_ext_hdr(u8 nexthdr) | 83 | ip6t_ext_hdr(u8 nexthdr) |
84 | { | 84 | { |
85 | return ( (nexthdr == IPPROTO_HOPOPTS) || | 85 | return (nexthdr == IPPROTO_HOPOPTS) || |
86 | (nexthdr == IPPROTO_ROUTING) || | 86 | (nexthdr == IPPROTO_ROUTING) || |
87 | (nexthdr == IPPROTO_FRAGMENT) || | 87 | (nexthdr == IPPROTO_FRAGMENT) || |
88 | (nexthdr == IPPROTO_ESP) || | 88 | (nexthdr == IPPROTO_ESP) || |
89 | (nexthdr == IPPROTO_AH) || | 89 | (nexthdr == IPPROTO_AH) || |
90 | (nexthdr == IPPROTO_NONE) || | 90 | (nexthdr == IPPROTO_NONE) || |
91 | (nexthdr == IPPROTO_DSTOPTS) ); | 91 | (nexthdr == IPPROTO_DSTOPTS); |
92 | } | 92 | } |
93 | 93 | ||
94 | /* Returns whether matches rule or not. */ | 94 | /* Returns whether matches rule or not. */ |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index e677937a07fc..45e6efb7f171 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -764,7 +764,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
764 | return -EINVAL; | 764 | return -EINVAL; |
765 | 765 | ||
766 | if (sin6->sin6_family && sin6->sin6_family != AF_INET6) | 766 | if (sin6->sin6_family && sin6->sin6_family != AF_INET6) |
767 | return(-EAFNOSUPPORT); | 767 | return -EAFNOSUPPORT; |
768 | 768 | ||
769 | /* port is the proto value [0..255] carried in nexthdr */ | 769 | /* port is the proto value [0..255] carried in nexthdr */ |
770 | proto = ntohs(sin6->sin6_port); | 770 | proto = ntohs(sin6->sin6_port); |
@@ -772,10 +772,10 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
772 | if (!proto) | 772 | if (!proto) |
773 | proto = inet->inet_num; | 773 | proto = inet->inet_num; |
774 | else if (proto != inet->inet_num) | 774 | else if (proto != inet->inet_num) |
775 | return(-EINVAL); | 775 | return -EINVAL; |
776 | 776 | ||
777 | if (proto > 255) | 777 | if (proto > 255) |
778 | return(-EINVAL); | 778 | return -EINVAL; |
779 | 779 | ||
780 | daddr = &sin6->sin6_addr; | 780 | daddr = &sin6->sin6_addr; |
781 | if (np->sndflow) { | 781 | if (np->sndflow) { |
@@ -985,7 +985,7 @@ static int do_rawv6_setsockopt(struct sock *sk, int level, int optname, | |||
985 | /* You may get strange result with a positive odd offset; | 985 | /* You may get strange result with a positive odd offset; |
986 | RFC2292bis agrees with me. */ | 986 | RFC2292bis agrees with me. */ |
987 | if (val > 0 && (val&1)) | 987 | if (val > 0 && (val&1)) |
988 | return(-EINVAL); | 988 | return -EINVAL; |
989 | if (val < 0) { | 989 | if (val < 0) { |
990 | rp->checksum = 0; | 990 | rp->checksum = 0; |
991 | } else { | 991 | } else { |
@@ -997,7 +997,7 @@ static int do_rawv6_setsockopt(struct sock *sk, int level, int optname, | |||
997 | break; | 997 | break; |
998 | 998 | ||
999 | default: | 999 | default: |
1000 | return(-ENOPROTOOPT); | 1000 | return -ENOPROTOOPT; |
1001 | } | 1001 | } |
1002 | } | 1002 | } |
1003 | 1003 | ||
@@ -1190,7 +1190,7 @@ static int rawv6_init_sk(struct sock *sk) | |||
1190 | default: | 1190 | default: |
1191 | break; | 1191 | break; |
1192 | } | 1192 | } |
1193 | return(0); | 1193 | return 0; |
1194 | } | 1194 | } |
1195 | 1195 | ||
1196 | struct proto rawv6_prot = { | 1196 | struct proto rawv6_prot = { |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index d126365ac046..25b0beda4331 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -217,14 +217,14 @@ static void ip6_dst_ifdown(struct dst_entry *dst, struct net_device *dev, | |||
217 | 217 | ||
218 | static __inline__ int rt6_check_expired(const struct rt6_info *rt) | 218 | static __inline__ int rt6_check_expired(const struct rt6_info *rt) |
219 | { | 219 | { |
220 | return (rt->rt6i_flags & RTF_EXPIRES && | 220 | return (rt->rt6i_flags & RTF_EXPIRES) && |
221 | time_after(jiffies, rt->rt6i_expires)); | 221 | time_after(jiffies, rt->rt6i_expires); |
222 | } | 222 | } |
223 | 223 | ||
224 | static inline int rt6_need_strict(struct in6_addr *daddr) | 224 | static inline int rt6_need_strict(struct in6_addr *daddr) |
225 | { | 225 | { |
226 | return (ipv6_addr_type(daddr) & | 226 | return ipv6_addr_type(daddr) & |
227 | (IPV6_ADDR_MULTICAST | IPV6_ADDR_LINKLOCAL | IPV6_ADDR_LOOPBACK)); | 227 | (IPV6_ADDR_MULTICAST | IPV6_ADDR_LINKLOCAL | IPV6_ADDR_LOOPBACK); |
228 | } | 228 | } |
229 | 229 | ||
230 | /* | 230 | /* |
@@ -440,7 +440,7 @@ static struct rt6_info *rt6_select(struct fib6_node *fn, int oif, int strict) | |||
440 | __func__, match); | 440 | __func__, match); |
441 | 441 | ||
442 | net = dev_net(rt0->rt6i_dev); | 442 | net = dev_net(rt0->rt6i_dev); |
443 | return (match ? match : net->ipv6.ip6_null_entry); | 443 | return match ? match : net->ipv6.ip6_null_entry; |
444 | } | 444 | } |
445 | 445 | ||
446 | #ifdef CONFIG_IPV6_ROUTE_INFO | 446 | #ifdef CONFIG_IPV6_ROUTE_INFO |
@@ -859,7 +859,7 @@ int ip6_dst_blackhole(struct sock *sk, struct dst_entry **dstp, struct flowi *fl | |||
859 | 859 | ||
860 | dst_release(*dstp); | 860 | dst_release(*dstp); |
861 | *dstp = new; | 861 | *dstp = new; |
862 | return (new ? 0 : -ENOMEM); | 862 | return new ? 0 : -ENOMEM; |
863 | } | 863 | } |
864 | EXPORT_SYMBOL_GPL(ip6_dst_blackhole); | 864 | EXPORT_SYMBOL_GPL(ip6_dst_blackhole); |
865 | 865 | ||
@@ -1070,7 +1070,7 @@ static int ip6_dst_gc(struct dst_ops *ops) | |||
1070 | net->ipv6.ip6_rt_gc_expire = rt_gc_timeout>>1; | 1070 | net->ipv6.ip6_rt_gc_expire = rt_gc_timeout>>1; |
1071 | out: | 1071 | out: |
1072 | net->ipv6.ip6_rt_gc_expire -= net->ipv6.ip6_rt_gc_expire>>rt_elasticity; | 1072 | net->ipv6.ip6_rt_gc_expire -= net->ipv6.ip6_rt_gc_expire>>rt_elasticity; |
1073 | return (atomic_read(&ops->entries) > rt_max_size); | 1073 | return atomic_read(&ops->entries) > rt_max_size; |
1074 | } | 1074 | } |
1075 | 1075 | ||
1076 | /* Clean host part of a prefix. Not necessary in radix tree, | 1076 | /* Clean host part of a prefix. Not necessary in radix tree, |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index fe6d40418c0b..8d93f6d81979 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -139,7 +139,7 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, | |||
139 | return -EINVAL; | 139 | return -EINVAL; |
140 | 140 | ||
141 | if (usin->sin6_family != AF_INET6) | 141 | if (usin->sin6_family != AF_INET6) |
142 | return(-EAFNOSUPPORT); | 142 | return -EAFNOSUPPORT; |
143 | 143 | ||
144 | memset(&fl, 0, sizeof(fl)); | 144 | memset(&fl, 0, sizeof(fl)); |
145 | 145 | ||
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c index 6baeabbbca82..39676eac3a37 100644 --- a/net/ipv6/xfrm6_policy.c +++ b/net/ipv6/xfrm6_policy.c | |||
@@ -199,7 +199,7 @@ static inline int xfrm6_garbage_collect(struct dst_ops *ops) | |||
199 | struct net *net = container_of(ops, struct net, xfrm.xfrm6_dst_ops); | 199 | struct net *net = container_of(ops, struct net, xfrm.xfrm6_dst_ops); |
200 | 200 | ||
201 | xfrm6_policy_afinfo.garbage_collect(net); | 201 | xfrm6_policy_afinfo.garbage_collect(net); |
202 | return (atomic_read(&ops->entries) > ops->gc_thresh * 2); | 202 | return atomic_read(&ops->entries) > ops->gc_thresh * 2; |
203 | } | 203 | } |
204 | 204 | ||
205 | static void xfrm6_update_pmtu(struct dst_entry *dst, u32 mtu) | 205 | static void xfrm6_update_pmtu(struct dst_entry *dst, u32 mtu) |
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index fd55b5135de5..bf3635129b17 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c | |||
@@ -573,9 +573,9 @@ static int irda_find_lsap_sel(struct irda_sock *self, char *name) | |||
573 | /* Requested object/attribute doesn't exist */ | 573 | /* Requested object/attribute doesn't exist */ |
574 | if((self->errno == IAS_CLASS_UNKNOWN) || | 574 | if((self->errno == IAS_CLASS_UNKNOWN) || |
575 | (self->errno == IAS_ATTRIB_UNKNOWN)) | 575 | (self->errno == IAS_ATTRIB_UNKNOWN)) |
576 | return (-EADDRNOTAVAIL); | 576 | return -EADDRNOTAVAIL; |
577 | else | 577 | else |
578 | return (-EHOSTUNREACH); | 578 | return -EHOSTUNREACH; |
579 | } | 579 | } |
580 | 580 | ||
581 | /* Get the remote TSAP selector */ | 581 | /* Get the remote TSAP selector */ |
@@ -663,7 +663,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) | |||
663 | __func__, name); | 663 | __func__, name); |
664 | self->daddr = DEV_ADDR_ANY; | 664 | self->daddr = DEV_ADDR_ANY; |
665 | kfree(discoveries); | 665 | kfree(discoveries); |
666 | return(-ENOTUNIQ); | 666 | return -ENOTUNIQ; |
667 | } | 667 | } |
668 | /* First time we found that one, save it ! */ | 668 | /* First time we found that one, save it ! */ |
669 | daddr = self->daddr; | 669 | daddr = self->daddr; |
@@ -677,7 +677,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) | |||
677 | IRDA_DEBUG(0, "%s(), unexpected IAS query failure\n", __func__); | 677 | IRDA_DEBUG(0, "%s(), unexpected IAS query failure\n", __func__); |
678 | self->daddr = DEV_ADDR_ANY; | 678 | self->daddr = DEV_ADDR_ANY; |
679 | kfree(discoveries); | 679 | kfree(discoveries); |
680 | return(-EHOSTUNREACH); | 680 | return -EHOSTUNREACH; |
681 | break; | 681 | break; |
682 | } | 682 | } |
683 | } | 683 | } |
@@ -689,7 +689,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) | |||
689 | IRDA_DEBUG(1, "%s(), cannot discover service ''%s'' in any device !!!\n", | 689 | IRDA_DEBUG(1, "%s(), cannot discover service ''%s'' in any device !!!\n", |
690 | __func__, name); | 690 | __func__, name); |
691 | self->daddr = DEV_ADDR_ANY; | 691 | self->daddr = DEV_ADDR_ANY; |
692 | return(-EADDRNOTAVAIL); | 692 | return -EADDRNOTAVAIL; |
693 | } | 693 | } |
694 | 694 | ||
695 | /* Revert back to discovered device & service */ | 695 | /* Revert back to discovered device & service */ |
@@ -2465,9 +2465,9 @@ bed: | |||
2465 | /* Requested object/attribute doesn't exist */ | 2465 | /* Requested object/attribute doesn't exist */ |
2466 | if((self->errno == IAS_CLASS_UNKNOWN) || | 2466 | if((self->errno == IAS_CLASS_UNKNOWN) || |
2467 | (self->errno == IAS_ATTRIB_UNKNOWN)) | 2467 | (self->errno == IAS_ATTRIB_UNKNOWN)) |
2468 | return (-EADDRNOTAVAIL); | 2468 | return -EADDRNOTAVAIL; |
2469 | else | 2469 | else |
2470 | return (-EHOSTUNREACH); | 2470 | return -EHOSTUNREACH; |
2471 | } | 2471 | } |
2472 | 2472 | ||
2473 | /* Translate from internal to user structure */ | 2473 | /* Translate from internal to user structure */ |
diff --git a/net/irda/discovery.c b/net/irda/discovery.c index c1c8ae939126..36c3f037f172 100644 --- a/net/irda/discovery.c +++ b/net/irda/discovery.c | |||
@@ -315,7 +315,7 @@ struct irda_device_info *irlmp_copy_discoveries(hashbin_t *log, int *pn, | |||
315 | 315 | ||
316 | /* Get the actual number of device in the buffer and return */ | 316 | /* Get the actual number of device in the buffer and return */ |
317 | *pn = i; | 317 | *pn = i; |
318 | return(buffer); | 318 | return buffer; |
319 | } | 319 | } |
320 | 320 | ||
321 | #ifdef CONFIG_PROC_FS | 321 | #ifdef CONFIG_PROC_FS |
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c index faa82ca2dfdc..a39cca8331df 100644 --- a/net/irda/ircomm/ircomm_tty.c +++ b/net/irda/ircomm/ircomm_tty.c | |||
@@ -449,8 +449,8 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) | |||
449 | } | 449 | } |
450 | 450 | ||
451 | #ifdef SERIAL_DO_RESTART | 451 | #ifdef SERIAL_DO_RESTART |
452 | return ((self->flags & ASYNC_HUP_NOTIFY) ? | 452 | return (self->flags & ASYNC_HUP_NOTIFY) ? |
453 | -EAGAIN : -ERESTARTSYS); | 453 | -EAGAIN : -ERESTARTSYS; |
454 | #else | 454 | #else |
455 | return -EAGAIN; | 455 | return -EAGAIN; |
456 | #endif | 456 | #endif |
diff --git a/net/irda/irlmp.c b/net/irda/irlmp.c index 0e7d8bde145d..6115a44c0a24 100644 --- a/net/irda/irlmp.c +++ b/net/irda/irlmp.c | |||
@@ -939,7 +939,7 @@ struct irda_device_info *irlmp_get_discoveries(int *pn, __u16 mask, int nslots) | |||
939 | } | 939 | } |
940 | 940 | ||
941 | /* Return current cached discovery log */ | 941 | /* Return current cached discovery log */ |
942 | return(irlmp_copy_discoveries(irlmp->cachelog, pn, mask, TRUE)); | 942 | return irlmp_copy_discoveries(irlmp->cachelog, pn, mask, TRUE); |
943 | } | 943 | } |
944 | EXPORT_SYMBOL(irlmp_get_discoveries); | 944 | EXPORT_SYMBOL(irlmp_get_discoveries); |
945 | 945 | ||
diff --git a/net/irda/irlmp_frame.c b/net/irda/irlmp_frame.c index 3750884094da..062e63b1c5c4 100644 --- a/net/irda/irlmp_frame.c +++ b/net/irda/irlmp_frame.c | |||
@@ -448,7 +448,7 @@ static struct lsap_cb *irlmp_find_lsap(struct lap_cb *self, __u8 dlsap_sel, | |||
448 | (self->cache.slsap_sel == slsap_sel) && | 448 | (self->cache.slsap_sel == slsap_sel) && |
449 | (self->cache.dlsap_sel == dlsap_sel)) | 449 | (self->cache.dlsap_sel == dlsap_sel)) |
450 | { | 450 | { |
451 | return (self->cache.lsap); | 451 | return self->cache.lsap; |
452 | } | 452 | } |
453 | #endif | 453 | #endif |
454 | 454 | ||
diff --git a/net/irda/irnet/irnet_irda.c b/net/irda/irnet/irnet_irda.c index e98e40d76f4f..7f17a8020e8a 100644 --- a/net/irda/irnet/irnet_irda.c +++ b/net/irda/irnet/irnet_irda.c | |||
@@ -238,7 +238,7 @@ irnet_ias_to_tsap(irnet_socket * self, | |||
238 | DEXIT(IRDA_SR_TRACE, "\n"); | 238 | DEXIT(IRDA_SR_TRACE, "\n"); |
239 | 239 | ||
240 | /* Return the TSAP */ | 240 | /* Return the TSAP */ |
241 | return(dtsap_sel); | 241 | return dtsap_sel; |
242 | } | 242 | } |
243 | 243 | ||
244 | /*------------------------------------------------------------------*/ | 244 | /*------------------------------------------------------------------*/ |
@@ -301,7 +301,7 @@ irnet_connect_tsap(irnet_socket * self) | |||
301 | { | 301 | { |
302 | clear_bit(0, &self->ttp_connect); | 302 | clear_bit(0, &self->ttp_connect); |
303 | DERROR(IRDA_SR_ERROR, "connect aborted!\n"); | 303 | DERROR(IRDA_SR_ERROR, "connect aborted!\n"); |
304 | return(err); | 304 | return err; |
305 | } | 305 | } |
306 | 306 | ||
307 | /* Connect to remote device */ | 307 | /* Connect to remote device */ |
@@ -312,7 +312,7 @@ irnet_connect_tsap(irnet_socket * self) | |||
312 | { | 312 | { |
313 | clear_bit(0, &self->ttp_connect); | 313 | clear_bit(0, &self->ttp_connect); |
314 | DERROR(IRDA_SR_ERROR, "connect aborted!\n"); | 314 | DERROR(IRDA_SR_ERROR, "connect aborted!\n"); |
315 | return(err); | 315 | return err; |
316 | } | 316 | } |
317 | 317 | ||
318 | /* The above call is non-blocking. | 318 | /* The above call is non-blocking. |
@@ -321,7 +321,7 @@ irnet_connect_tsap(irnet_socket * self) | |||
321 | * See you there ;-) */ | 321 | * See you there ;-) */ |
322 | 322 | ||
323 | DEXIT(IRDA_SR_TRACE, "\n"); | 323 | DEXIT(IRDA_SR_TRACE, "\n"); |
324 | return(err); | 324 | return err; |
325 | } | 325 | } |
326 | 326 | ||
327 | /*------------------------------------------------------------------*/ | 327 | /*------------------------------------------------------------------*/ |
@@ -362,10 +362,10 @@ irnet_discover_next_daddr(irnet_socket * self) | |||
362 | /* The above request is non-blocking. | 362 | /* The above request is non-blocking. |
363 | * After a while, IrDA will call us back in irnet_discovervalue_confirm() | 363 | * After a while, IrDA will call us back in irnet_discovervalue_confirm() |
364 | * We will then call irnet_ias_to_tsap() and come back here again... */ | 364 | * We will then call irnet_ias_to_tsap() and come back here again... */ |
365 | return(0); | 365 | return 0; |
366 | } | 366 | } |
367 | else | 367 | else |
368 | return(1); | 368 | return 1; |
369 | } | 369 | } |
370 | 370 | ||
371 | /*------------------------------------------------------------------*/ | 371 | /*------------------------------------------------------------------*/ |
@@ -436,7 +436,7 @@ irnet_discover_daddr_and_lsap_sel(irnet_socket * self) | |||
436 | /* Follow me in irnet_discovervalue_confirm() */ | 436 | /* Follow me in irnet_discovervalue_confirm() */ |
437 | 437 | ||
438 | DEXIT(IRDA_SR_TRACE, "\n"); | 438 | DEXIT(IRDA_SR_TRACE, "\n"); |
439 | return(0); | 439 | return 0; |
440 | } | 440 | } |
441 | 441 | ||
442 | /*------------------------------------------------------------------*/ | 442 | /*------------------------------------------------------------------*/ |
@@ -485,7 +485,7 @@ irnet_dname_to_daddr(irnet_socket * self) | |||
485 | /* No luck ! */ | 485 | /* No luck ! */ |
486 | DEBUG(IRDA_SR_INFO, "cannot discover device ``%s'' !!!\n", self->rname); | 486 | DEBUG(IRDA_SR_INFO, "cannot discover device ``%s'' !!!\n", self->rname); |
487 | kfree(discoveries); | 487 | kfree(discoveries); |
488 | return(-EADDRNOTAVAIL); | 488 | return -EADDRNOTAVAIL; |
489 | } | 489 | } |
490 | 490 | ||
491 | 491 | ||
@@ -527,7 +527,7 @@ irda_irnet_create(irnet_socket * self) | |||
527 | INIT_WORK(&self->disconnect_work, irnet_ppp_disconnect); | 527 | INIT_WORK(&self->disconnect_work, irnet_ppp_disconnect); |
528 | 528 | ||
529 | DEXIT(IRDA_SOCK_TRACE, "\n"); | 529 | DEXIT(IRDA_SOCK_TRACE, "\n"); |
530 | return(0); | 530 | return 0; |
531 | } | 531 | } |
532 | 532 | ||
533 | /*------------------------------------------------------------------*/ | 533 | /*------------------------------------------------------------------*/ |
@@ -601,7 +601,7 @@ irda_irnet_connect(irnet_socket * self) | |||
601 | * We will finish the connection procedure in irnet_connect_tsap(). | 601 | * We will finish the connection procedure in irnet_connect_tsap(). |
602 | */ | 602 | */ |
603 | DEXIT(IRDA_SOCK_TRACE, "\n"); | 603 | DEXIT(IRDA_SOCK_TRACE, "\n"); |
604 | return(0); | 604 | return 0; |
605 | } | 605 | } |
606 | 606 | ||
607 | /*------------------------------------------------------------------*/ | 607 | /*------------------------------------------------------------------*/ |
@@ -733,7 +733,7 @@ irnet_daddr_to_dname(irnet_socket * self) | |||
733 | /* No luck ! */ | 733 | /* No luck ! */ |
734 | DEXIT(IRDA_SERV_INFO, ": cannot discover device 0x%08x !!!\n", self->daddr); | 734 | DEXIT(IRDA_SERV_INFO, ": cannot discover device 0x%08x !!!\n", self->daddr); |
735 | kfree(discoveries); | 735 | kfree(discoveries); |
736 | return(-EADDRNOTAVAIL); | 736 | return -EADDRNOTAVAIL; |
737 | } | 737 | } |
738 | 738 | ||
739 | /*------------------------------------------------------------------*/ | 739 | /*------------------------------------------------------------------*/ |
diff --git a/net/irda/irnet/irnet_ppp.c b/net/irda/irnet/irnet_ppp.c index dfe7b38dd4af..69f1fa64994e 100644 --- a/net/irda/irnet/irnet_ppp.c +++ b/net/irda/irnet/irnet_ppp.c | |||
@@ -166,7 +166,7 @@ irnet_ctrl_write(irnet_socket * ap, | |||
166 | } | 166 | } |
167 | 167 | ||
168 | /* Success : we have parsed all commands successfully */ | 168 | /* Success : we have parsed all commands successfully */ |
169 | return(count); | 169 | return count; |
170 | } | 170 | } |
171 | 171 | ||
172 | #ifdef INITIAL_DISCOVERY | 172 | #ifdef INITIAL_DISCOVERY |
@@ -300,7 +300,7 @@ irnet_ctrl_read(irnet_socket * ap, | |||
300 | } | 300 | } |
301 | 301 | ||
302 | DEXIT(CTRL_TRACE, "\n"); | 302 | DEXIT(CTRL_TRACE, "\n"); |
303 | return(strlen(event)); | 303 | return strlen(event); |
304 | } | 304 | } |
305 | #endif /* INITIAL_DISCOVERY */ | 305 | #endif /* INITIAL_DISCOVERY */ |
306 | 306 | ||
@@ -409,7 +409,7 @@ irnet_ctrl_read(irnet_socket * ap, | |||
409 | } | 409 | } |
410 | 410 | ||
411 | DEXIT(CTRL_TRACE, "\n"); | 411 | DEXIT(CTRL_TRACE, "\n"); |
412 | return(strlen(event)); | 412 | return strlen(event); |
413 | } | 413 | } |
414 | 414 | ||
415 | /*------------------------------------------------------------------*/ | 415 | /*------------------------------------------------------------------*/ |
@@ -623,7 +623,7 @@ dev_irnet_poll(struct file * file, | |||
623 | mask |= irnet_ctrl_poll(ap, file, wait); | 623 | mask |= irnet_ctrl_poll(ap, file, wait); |
624 | 624 | ||
625 | DEXIT(FS_TRACE, " - mask=0x%X\n", mask); | 625 | DEXIT(FS_TRACE, " - mask=0x%X\n", mask); |
626 | return(mask); | 626 | return mask; |
627 | } | 627 | } |
628 | 628 | ||
629 | /*------------------------------------------------------------------*/ | 629 | /*------------------------------------------------------------------*/ |
diff --git a/net/key/af_key.c b/net/key/af_key.c index 43040e97c474..d87c22df6f1e 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -565,12 +565,12 @@ pfkey_proto2satype(uint16_t proto) | |||
565 | 565 | ||
566 | static uint8_t pfkey_proto_to_xfrm(uint8_t proto) | 566 | static uint8_t pfkey_proto_to_xfrm(uint8_t proto) |
567 | { | 567 | { |
568 | return (proto == IPSEC_PROTO_ANY ? 0 : proto); | 568 | return proto == IPSEC_PROTO_ANY ? 0 : proto; |
569 | } | 569 | } |
570 | 570 | ||
571 | static uint8_t pfkey_proto_from_xfrm(uint8_t proto) | 571 | static uint8_t pfkey_proto_from_xfrm(uint8_t proto) |
572 | { | 572 | { |
573 | return (proto ? proto : IPSEC_PROTO_ANY); | 573 | return proto ? proto : IPSEC_PROTO_ANY; |
574 | } | 574 | } |
575 | 575 | ||
576 | static inline int pfkey_sockaddr_len(sa_family_t family) | 576 | static inline int pfkey_sockaddr_len(sa_family_t family) |
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index 4f772de2f213..b0cc385bf989 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c | |||
@@ -207,7 +207,7 @@ static bool rc_no_data_or_no_ack(struct ieee80211_tx_rate_control *txrc) | |||
207 | 207 | ||
208 | fc = hdr->frame_control; | 208 | fc = hdr->frame_control; |
209 | 209 | ||
210 | return ((info->flags & IEEE80211_TX_CTL_NO_ACK) || !ieee80211_is_data(fc)); | 210 | return (info->flags & IEEE80211_TX_CTL_NO_ACK) || !ieee80211_is_data(fc); |
211 | } | 211 | } |
212 | 212 | ||
213 | static void rc_send_low_broadcast(s8 *idx, u32 basic_rates, u8 max_rate_idx) | 213 | static void rc_send_low_broadcast(s8 *idx, u32 basic_rates, u8 max_rate_idx) |
diff --git a/net/rfkill/input.c b/net/rfkill/input.c index 3713d7ecab96..1bca6d49ec96 100644 --- a/net/rfkill/input.c +++ b/net/rfkill/input.c | |||
@@ -142,7 +142,7 @@ static unsigned long rfkill_last_scheduled; | |||
142 | static unsigned long rfkill_ratelimit(const unsigned long last) | 142 | static unsigned long rfkill_ratelimit(const unsigned long last) |
143 | { | 143 | { |
144 | const unsigned long delay = msecs_to_jiffies(RFKILL_OPS_DELAY); | 144 | const unsigned long delay = msecs_to_jiffies(RFKILL_OPS_DELAY); |
145 | return (time_after(jiffies, last + delay)) ? 0 : delay; | 145 | return time_after(jiffies, last + delay) ? 0 : delay; |
146 | } | 146 | } |
147 | 147 | ||
148 | static void rfkill_schedule_ratelimited(void) | 148 | static void rfkill_schedule_ratelimited(void) |
diff --git a/net/rose/rose_link.c b/net/rose/rose_link.c index a750a28e0221..fa5f5641a2c2 100644 --- a/net/rose/rose_link.c +++ b/net/rose/rose_link.c | |||
@@ -114,7 +114,7 @@ static int rose_send_frame(struct sk_buff *skb, struct rose_neigh *neigh) | |||
114 | if (ax25s) | 114 | if (ax25s) |
115 | ax25_cb_put(ax25s); | 115 | ax25_cb_put(ax25s); |
116 | 116 | ||
117 | return (neigh->ax25 != NULL); | 117 | return neigh->ax25 != NULL; |
118 | } | 118 | } |
119 | 119 | ||
120 | /* | 120 | /* |
@@ -137,7 +137,7 @@ static int rose_link_up(struct rose_neigh *neigh) | |||
137 | if (ax25s) | 137 | if (ax25s) |
138 | ax25_cb_put(ax25s); | 138 | ax25_cb_put(ax25s); |
139 | 139 | ||
140 | return (neigh->ax25 != NULL); | 140 | return neigh->ax25 != NULL; |
141 | } | 141 | } |
142 | 142 | ||
143 | /* | 143 | /* |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index f774e657641a..1ef29c74d85e 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -799,7 +799,7 @@ static void sctp_inet_skb_msgname(struct sk_buff *skb, char *msgname, int *len) | |||
799 | static int sctp_inet_af_supported(sa_family_t family, struct sctp_sock *sp) | 799 | static int sctp_inet_af_supported(sa_family_t family, struct sctp_sock *sp) |
800 | { | 800 | { |
801 | /* PF_INET only supports AF_INET addresses. */ | 801 | /* PF_INET only supports AF_INET addresses. */ |
802 | return (AF_INET == family); | 802 | return AF_INET == family; |
803 | } | 803 | } |
804 | 804 | ||
805 | /* Address matching with wildcards allowed. */ | 805 | /* Address matching with wildcards allowed. */ |
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 6a691d84aef4..535659fdbaa1 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -3884,7 +3884,7 @@ static int sctp_getsockopt_sctp_status(struct sock *sk, int len, | |||
3884 | } | 3884 | } |
3885 | 3885 | ||
3886 | out: | 3886 | out: |
3887 | return (retval); | 3887 | return retval; |
3888 | } | 3888 | } |
3889 | 3889 | ||
3890 | 3890 | ||
@@ -3940,7 +3940,7 @@ static int sctp_getsockopt_peer_addr_info(struct sock *sk, int len, | |||
3940 | } | 3940 | } |
3941 | 3941 | ||
3942 | out: | 3942 | out: |
3943 | return (retval); | 3943 | return retval; |
3944 | } | 3944 | } |
3945 | 3945 | ||
3946 | /* 7.1.12 Enable/Disable message fragmentation (SCTP_DISABLE_FRAGMENTS) | 3946 | /* 7.1.12 Enable/Disable message fragmentation (SCTP_DISABLE_FRAGMENTS) |
@@ -5594,7 +5594,7 @@ static int sctp_get_port(struct sock *sk, unsigned short snum) | |||
5594 | /* Note: sk->sk_num gets filled in if ephemeral port request. */ | 5594 | /* Note: sk->sk_num gets filled in if ephemeral port request. */ |
5595 | ret = sctp_get_port_local(sk, &addr); | 5595 | ret = sctp_get_port_local(sk, &addr); |
5596 | 5596 | ||
5597 | return (ret ? 1 : 0); | 5597 | return ret ? 1 : 0; |
5598 | } | 5598 | } |
5599 | 5599 | ||
5600 | /* | 5600 | /* |
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index dcfc66bab2bb..597c493392ad 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -1049,7 +1049,7 @@ gss_match(struct auth_cred *acred, struct rpc_cred *rc, int flags) | |||
1049 | out: | 1049 | out: |
1050 | if (acred->machine_cred != gss_cred->gc_machine_cred) | 1050 | if (acred->machine_cred != gss_cred->gc_machine_cred) |
1051 | return 0; | 1051 | return 0; |
1052 | return (rc->cr_uid == acred->uid); | 1052 | return rc->cr_uid == acred->uid; |
1053 | } | 1053 | } |
1054 | 1054 | ||
1055 | /* | 1055 | /* |
diff --git a/net/sunrpc/auth_gss/gss_generic_token.c b/net/sunrpc/auth_gss/gss_generic_token.c index 310b78e99456..c586e92bcf76 100644 --- a/net/sunrpc/auth_gss/gss_generic_token.c +++ b/net/sunrpc/auth_gss/gss_generic_token.c | |||
@@ -76,19 +76,19 @@ static int | |||
76 | der_length_size( int length) | 76 | der_length_size( int length) |
77 | { | 77 | { |
78 | if (length < (1<<7)) | 78 | if (length < (1<<7)) |
79 | return(1); | 79 | return 1; |
80 | else if (length < (1<<8)) | 80 | else if (length < (1<<8)) |
81 | return(2); | 81 | return 2; |
82 | #if (SIZEOF_INT == 2) | 82 | #if (SIZEOF_INT == 2) |
83 | else | 83 | else |
84 | return(3); | 84 | return 3; |
85 | #else | 85 | #else |
86 | else if (length < (1<<16)) | 86 | else if (length < (1<<16)) |
87 | return(3); | 87 | return 3; |
88 | else if (length < (1<<24)) | 88 | else if (length < (1<<24)) |
89 | return(4); | 89 | return 4; |
90 | else | 90 | else |
91 | return(5); | 91 | return 5; |
92 | #endif | 92 | #endif |
93 | } | 93 | } |
94 | 94 | ||
@@ -121,14 +121,14 @@ der_read_length(unsigned char **buf, int *bufsize) | |||
121 | int ret; | 121 | int ret; |
122 | 122 | ||
123 | if (*bufsize < 1) | 123 | if (*bufsize < 1) |
124 | return(-1); | 124 | return -1; |
125 | sf = *(*buf)++; | 125 | sf = *(*buf)++; |
126 | (*bufsize)--; | 126 | (*bufsize)--; |
127 | if (sf & 0x80) { | 127 | if (sf & 0x80) { |
128 | if ((sf &= 0x7f) > ((*bufsize)-1)) | 128 | if ((sf &= 0x7f) > ((*bufsize)-1)) |
129 | return(-1); | 129 | return -1; |
130 | if (sf > SIZEOF_INT) | 130 | if (sf > SIZEOF_INT) |
131 | return (-1); | 131 | return -1; |
132 | ret = 0; | 132 | ret = 0; |
133 | for (; sf; sf--) { | 133 | for (; sf; sf--) { |
134 | ret = (ret<<8) + (*(*buf)++); | 134 | ret = (ret<<8) + (*(*buf)++); |
@@ -138,7 +138,7 @@ der_read_length(unsigned char **buf, int *bufsize) | |||
138 | ret = sf; | 138 | ret = sf; |
139 | } | 139 | } |
140 | 140 | ||
141 | return(ret); | 141 | return ret; |
142 | } | 142 | } |
143 | 143 | ||
144 | /* returns the length of a token, given the mech oid and the body size */ | 144 | /* returns the length of a token, given the mech oid and the body size */ |
@@ -148,7 +148,7 @@ g_token_size(struct xdr_netobj *mech, unsigned int body_size) | |||
148 | { | 148 | { |
149 | /* set body_size to sequence contents size */ | 149 | /* set body_size to sequence contents size */ |
150 | body_size += 2 + (int) mech->len; /* NEED overflow check */ | 150 | body_size += 2 + (int) mech->len; /* NEED overflow check */ |
151 | return(1 + der_length_size(body_size) + body_size); | 151 | return 1 + der_length_size(body_size) + body_size; |
152 | } | 152 | } |
153 | 153 | ||
154 | EXPORT_SYMBOL_GPL(g_token_size); | 154 | EXPORT_SYMBOL_GPL(g_token_size); |
@@ -186,27 +186,27 @@ g_verify_token_header(struct xdr_netobj *mech, int *body_size, | |||
186 | int ret = 0; | 186 | int ret = 0; |
187 | 187 | ||
188 | if ((toksize-=1) < 0) | 188 | if ((toksize-=1) < 0) |
189 | return(G_BAD_TOK_HEADER); | 189 | return G_BAD_TOK_HEADER; |
190 | if (*buf++ != 0x60) | 190 | if (*buf++ != 0x60) |
191 | return(G_BAD_TOK_HEADER); | 191 | return G_BAD_TOK_HEADER; |
192 | 192 | ||
193 | if ((seqsize = der_read_length(&buf, &toksize)) < 0) | 193 | if ((seqsize = der_read_length(&buf, &toksize)) < 0) |
194 | return(G_BAD_TOK_HEADER); | 194 | return G_BAD_TOK_HEADER; |
195 | 195 | ||
196 | if (seqsize != toksize) | 196 | if (seqsize != toksize) |
197 | return(G_BAD_TOK_HEADER); | 197 | return G_BAD_TOK_HEADER; |
198 | 198 | ||
199 | if ((toksize-=1) < 0) | 199 | if ((toksize-=1) < 0) |
200 | return(G_BAD_TOK_HEADER); | 200 | return G_BAD_TOK_HEADER; |
201 | if (*buf++ != 0x06) | 201 | if (*buf++ != 0x06) |
202 | return(G_BAD_TOK_HEADER); | 202 | return G_BAD_TOK_HEADER; |
203 | 203 | ||
204 | if ((toksize-=1) < 0) | 204 | if ((toksize-=1) < 0) |
205 | return(G_BAD_TOK_HEADER); | 205 | return G_BAD_TOK_HEADER; |
206 | toid.len = *buf++; | 206 | toid.len = *buf++; |
207 | 207 | ||
208 | if ((toksize-=toid.len) < 0) | 208 | if ((toksize-=toid.len) < 0) |
209 | return(G_BAD_TOK_HEADER); | 209 | return G_BAD_TOK_HEADER; |
210 | toid.data = buf; | 210 | toid.data = buf; |
211 | buf+=toid.len; | 211 | buf+=toid.len; |
212 | 212 | ||
@@ -217,17 +217,17 @@ g_verify_token_header(struct xdr_netobj *mech, int *body_size, | |||
217 | to return G_BAD_TOK_HEADER if the token header is in fact bad */ | 217 | to return G_BAD_TOK_HEADER if the token header is in fact bad */ |
218 | 218 | ||
219 | if ((toksize-=2) < 0) | 219 | if ((toksize-=2) < 0) |
220 | return(G_BAD_TOK_HEADER); | 220 | return G_BAD_TOK_HEADER; |
221 | 221 | ||
222 | if (ret) | 222 | if (ret) |
223 | return(ret); | 223 | return ret; |
224 | 224 | ||
225 | if (!ret) { | 225 | if (!ret) { |
226 | *buf_in = buf; | 226 | *buf_in = buf; |
227 | *body_size = toksize; | 227 | *body_size = toksize; |
228 | } | 228 | } |
229 | 229 | ||
230 | return(ret); | 230 | return ret; |
231 | } | 231 | } |
232 | 232 | ||
233 | EXPORT_SYMBOL_GPL(g_verify_token_header); | 233 | EXPORT_SYMBOL_GPL(g_verify_token_header); |
diff --git a/net/sunrpc/auth_gss/gss_krb5_seqnum.c b/net/sunrpc/auth_gss/gss_krb5_seqnum.c index 415c013ba382..62ac90c62cb1 100644 --- a/net/sunrpc/auth_gss/gss_krb5_seqnum.c +++ b/net/sunrpc/auth_gss/gss_krb5_seqnum.c | |||
@@ -162,5 +162,5 @@ krb5_get_seq_num(struct krb5_ctx *kctx, | |||
162 | *seqnum = ((plain[0]) | | 162 | *seqnum = ((plain[0]) | |
163 | (plain[1] << 8) | (plain[2] << 16) | (plain[3] << 24)); | 163 | (plain[1] << 8) | (plain[2] << 16) | (plain[3] << 24)); |
164 | 164 | ||
165 | return (0); | 165 | return 0; |
166 | } | 166 | } |
diff --git a/net/sunrpc/auth_gss/gss_mech_switch.c b/net/sunrpc/auth_gss/gss_mech_switch.c index 2689de39dc78..8b4061049d76 100644 --- a/net/sunrpc/auth_gss/gss_mech_switch.c +++ b/net/sunrpc/auth_gss/gss_mech_switch.c | |||
@@ -331,7 +331,7 @@ gss_delete_sec_context(struct gss_ctx **context_handle) | |||
331 | *context_handle); | 331 | *context_handle); |
332 | 332 | ||
333 | if (!*context_handle) | 333 | if (!*context_handle) |
334 | return(GSS_S_NO_CONTEXT); | 334 | return GSS_S_NO_CONTEXT; |
335 | if ((*context_handle)->internal_ctx_id) | 335 | if ((*context_handle)->internal_ctx_id) |
336 | (*context_handle)->mech_type->gm_ops | 336 | (*context_handle)->mech_type->gm_ops |
337 | ->gss_delete_sec_context((*context_handle) | 337 | ->gss_delete_sec_context((*context_handle) |
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index cace6049e4a5..aa5dbda6608c 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -376,7 +376,7 @@ int rpc_queue_empty(struct rpc_wait_queue *queue) | |||
376 | spin_lock_bh(&queue->lock); | 376 | spin_lock_bh(&queue->lock); |
377 | res = queue->qlen; | 377 | res = queue->qlen; |
378 | spin_unlock_bh(&queue->lock); | 378 | spin_unlock_bh(&queue->lock); |
379 | return (res == 0); | 379 | return res == 0; |
380 | } | 380 | } |
381 | EXPORT_SYMBOL_GPL(rpc_queue_empty); | 381 | EXPORT_SYMBOL_GPL(rpc_queue_empty); |
382 | 382 | ||
diff --git a/net/tipc/addr.c b/net/tipc/addr.c index c048543ffbeb..2ddc351b3be9 100644 --- a/net/tipc/addr.c +++ b/net/tipc/addr.c | |||
@@ -89,7 +89,7 @@ int tipc_addr_domain_valid(u32 addr) | |||
89 | 89 | ||
90 | int tipc_addr_node_valid(u32 addr) | 90 | int tipc_addr_node_valid(u32 addr) |
91 | { | 91 | { |
92 | return (tipc_addr_domain_valid(addr) && tipc_node(addr)); | 92 | return tipc_addr_domain_valid(addr) && tipc_node(addr); |
93 | } | 93 | } |
94 | 94 | ||
95 | int tipc_in_scope(u32 domain, u32 addr) | 95 | int tipc_in_scope(u32 domain, u32 addr) |
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index b11248c2d788..ecfaac10d0b4 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c | |||
@@ -184,7 +184,7 @@ static void bclink_set_gap(struct tipc_node *n_ptr) | |||
184 | 184 | ||
185 | static int bclink_ack_allowed(u32 n) | 185 | static int bclink_ack_allowed(u32 n) |
186 | { | 186 | { |
187 | return((n % TIPC_MIN_LINK_WIN) == tipc_own_tag); | 187 | return (n % TIPC_MIN_LINK_WIN) == tipc_own_tag; |
188 | } | 188 | } |
189 | 189 | ||
190 | 190 | ||
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index 52ae17b2583e..9c10c6b7c12b 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c | |||
@@ -63,7 +63,7 @@ static int media_name_valid(const char *name) | |||
63 | len = strlen(name); | 63 | len = strlen(name); |
64 | if ((len + 1) > TIPC_MAX_MEDIA_NAME) | 64 | if ((len + 1) > TIPC_MAX_MEDIA_NAME) |
65 | return 0; | 65 | return 0; |
66 | return (strspn(name, tipc_alphabet) == len); | 66 | return strspn(name, tipc_alphabet) == len; |
67 | } | 67 | } |
68 | 68 | ||
69 | /** | 69 | /** |
diff --git a/net/tipc/dbg.c b/net/tipc/dbg.c index 1885a7edb0c8..6569d45bfb9a 100644 --- a/net/tipc/dbg.c +++ b/net/tipc/dbg.c | |||
@@ -134,7 +134,7 @@ void tipc_printbuf_reset(struct print_buf *pb) | |||
134 | 134 | ||
135 | int tipc_printbuf_empty(struct print_buf *pb) | 135 | int tipc_printbuf_empty(struct print_buf *pb) |
136 | { | 136 | { |
137 | return (!pb->buf || (pb->crs == pb->buf)); | 137 | return !pb->buf || (pb->crs == pb->buf); |
138 | } | 138 | } |
139 | 139 | ||
140 | /** | 140 | /** |
@@ -169,7 +169,7 @@ int tipc_printbuf_validate(struct print_buf *pb) | |||
169 | tipc_printf(pb, err); | 169 | tipc_printf(pb, err); |
170 | } | 170 | } |
171 | } | 171 | } |
172 | return (pb->crs - pb->buf + 1); | 172 | return pb->crs - pb->buf + 1; |
173 | } | 173 | } |
174 | 174 | ||
175 | /** | 175 | /** |
diff --git a/net/tipc/link.c b/net/tipc/link.c index a6a3102bb4d6..b8cf1e9d0b86 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -239,13 +239,13 @@ int tipc_link_is_up(struct link *l_ptr) | |||
239 | { | 239 | { |
240 | if (!l_ptr) | 240 | if (!l_ptr) |
241 | return 0; | 241 | return 0; |
242 | return (link_working_working(l_ptr) || link_working_unknown(l_ptr)); | 242 | return link_working_working(l_ptr) || link_working_unknown(l_ptr); |
243 | } | 243 | } |
244 | 244 | ||
245 | int tipc_link_is_active(struct link *l_ptr) | 245 | int tipc_link_is_active(struct link *l_ptr) |
246 | { | 246 | { |
247 | return ((l_ptr->owner->active_links[0] == l_ptr) || | 247 | return (l_ptr->owner->active_links[0] == l_ptr) || |
248 | (l_ptr->owner->active_links[1] == l_ptr)); | 248 | (l_ptr->owner->active_links[1] == l_ptr); |
249 | } | 249 | } |
250 | 250 | ||
251 | /** | 251 | /** |
diff --git a/net/tipc/link.h b/net/tipc/link.h index 2e5385c47d30..26151d30589d 100644 --- a/net/tipc/link.h +++ b/net/tipc/link.h | |||
@@ -279,12 +279,12 @@ static inline int between(u32 lower, u32 upper, u32 n) | |||
279 | 279 | ||
280 | static inline int less_eq(u32 left, u32 right) | 280 | static inline int less_eq(u32 left, u32 right) |
281 | { | 281 | { |
282 | return (mod(right - left) < 32768u); | 282 | return mod(right - left) < 32768u; |
283 | } | 283 | } |
284 | 284 | ||
285 | static inline int less(u32 left, u32 right) | 285 | static inline int less(u32 left, u32 right) |
286 | { | 286 | { |
287 | return (less_eq(left, right) && (mod(right) != mod(left))); | 287 | return less_eq(left, right) && (mod(right) != mod(left)); |
288 | } | 288 | } |
289 | 289 | ||
290 | static inline u32 lesser(u32 left, u32 right) | 290 | static inline u32 lesser(u32 left, u32 right) |
@@ -299,32 +299,32 @@ static inline u32 lesser(u32 left, u32 right) | |||
299 | 299 | ||
300 | static inline int link_working_working(struct link *l_ptr) | 300 | static inline int link_working_working(struct link *l_ptr) |
301 | { | 301 | { |
302 | return (l_ptr->state == WORKING_WORKING); | 302 | return l_ptr->state == WORKING_WORKING; |
303 | } | 303 | } |
304 | 304 | ||
305 | static inline int link_working_unknown(struct link *l_ptr) | 305 | static inline int link_working_unknown(struct link *l_ptr) |
306 | { | 306 | { |
307 | return (l_ptr->state == WORKING_UNKNOWN); | 307 | return l_ptr->state == WORKING_UNKNOWN; |
308 | } | 308 | } |
309 | 309 | ||
310 | static inline int link_reset_unknown(struct link *l_ptr) | 310 | static inline int link_reset_unknown(struct link *l_ptr) |
311 | { | 311 | { |
312 | return (l_ptr->state == RESET_UNKNOWN); | 312 | return l_ptr->state == RESET_UNKNOWN; |
313 | } | 313 | } |
314 | 314 | ||
315 | static inline int link_reset_reset(struct link *l_ptr) | 315 | static inline int link_reset_reset(struct link *l_ptr) |
316 | { | 316 | { |
317 | return (l_ptr->state == RESET_RESET); | 317 | return l_ptr->state == RESET_RESET; |
318 | } | 318 | } |
319 | 319 | ||
320 | static inline int link_blocked(struct link *l_ptr) | 320 | static inline int link_blocked(struct link *l_ptr) |
321 | { | 321 | { |
322 | return (l_ptr->exp_msg_count || l_ptr->blocked); | 322 | return l_ptr->exp_msg_count || l_ptr->blocked; |
323 | } | 323 | } |
324 | 324 | ||
325 | static inline int link_congested(struct link *l_ptr) | 325 | static inline int link_congested(struct link *l_ptr) |
326 | { | 326 | { |
327 | return (l_ptr->out_queue_size >= l_ptr->queue_limit[0]); | 327 | return l_ptr->out_queue_size >= l_ptr->queue_limit[0]; |
328 | } | 328 | } |
329 | 329 | ||
330 | #endif | 330 | #endif |
diff --git a/net/tipc/msg.h b/net/tipc/msg.h index 995d2da35b01..031aad18efce 100644 --- a/net/tipc/msg.h +++ b/net/tipc/msg.h | |||
@@ -104,7 +104,7 @@ static inline u32 msg_user(struct tipc_msg *m) | |||
104 | 104 | ||
105 | static inline u32 msg_isdata(struct tipc_msg *m) | 105 | static inline u32 msg_isdata(struct tipc_msg *m) |
106 | { | 106 | { |
107 | return (msg_user(m) <= TIPC_CRITICAL_IMPORTANCE); | 107 | return msg_user(m) <= TIPC_CRITICAL_IMPORTANCE; |
108 | } | 108 | } |
109 | 109 | ||
110 | static inline void msg_set_user(struct tipc_msg *m, u32 n) | 110 | static inline void msg_set_user(struct tipc_msg *m, u32 n) |
@@ -289,7 +289,7 @@ static inline void msg_set_destnode(struct tipc_msg *m, u32 a) | |||
289 | 289 | ||
290 | static inline int msg_is_dest(struct tipc_msg *m, u32 d) | 290 | static inline int msg_is_dest(struct tipc_msg *m, u32 d) |
291 | { | 291 | { |
292 | return(msg_short(m) || (msg_destnode(m) == d)); | 292 | return msg_short(m) || (msg_destnode(m) == d); |
293 | } | 293 | } |
294 | 294 | ||
295 | static inline u32 msg_routed(struct tipc_msg *m) | 295 | static inline u32 msg_routed(struct tipc_msg *m) |
@@ -632,7 +632,7 @@ static inline void msg_set_bcast_tag(struct tipc_msg *m, u32 n) | |||
632 | 632 | ||
633 | static inline u32 msg_max_pkt(struct tipc_msg *m) | 633 | static inline u32 msg_max_pkt(struct tipc_msg *m) |
634 | { | 634 | { |
635 | return (msg_bits(m, 9, 16, 0xffff) * 4); | 635 | return msg_bits(m, 9, 16, 0xffff) * 4; |
636 | } | 636 | } |
637 | 637 | ||
638 | static inline void msg_set_max_pkt(struct tipc_msg *m, u32 n) | 638 | static inline void msg_set_max_pkt(struct tipc_msg *m, u32 n) |
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index c13c2c7c4b57..9ca4b0689237 100644 --- a/net/tipc/name_table.c +++ b/net/tipc/name_table.c | |||
@@ -116,7 +116,7 @@ DEFINE_RWLOCK(tipc_nametbl_lock); | |||
116 | 116 | ||
117 | static int hash(int x) | 117 | static int hash(int x) |
118 | { | 118 | { |
119 | return(x & (tipc_nametbl_size - 1)); | 119 | return x & (tipc_nametbl_size - 1); |
120 | } | 120 | } |
121 | 121 | ||
122 | /** | 122 | /** |
diff --git a/net/tipc/node.c b/net/tipc/node.c index b702c7bf580f..7c49cd056df7 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c | |||
@@ -242,17 +242,17 @@ int tipc_node_has_active_links(struct tipc_node *n_ptr) | |||
242 | 242 | ||
243 | int tipc_node_has_redundant_links(struct tipc_node *n_ptr) | 243 | int tipc_node_has_redundant_links(struct tipc_node *n_ptr) |
244 | { | 244 | { |
245 | return (n_ptr->working_links > 1); | 245 | return n_ptr->working_links > 1; |
246 | } | 246 | } |
247 | 247 | ||
248 | static int tipc_node_has_active_routes(struct tipc_node *n_ptr) | 248 | static int tipc_node_has_active_routes(struct tipc_node *n_ptr) |
249 | { | 249 | { |
250 | return (n_ptr && (n_ptr->last_router >= 0)); | 250 | return n_ptr && (n_ptr->last_router >= 0); |
251 | } | 251 | } |
252 | 252 | ||
253 | int tipc_node_is_up(struct tipc_node *n_ptr) | 253 | int tipc_node_is_up(struct tipc_node *n_ptr) |
254 | { | 254 | { |
255 | return (tipc_node_has_active_links(n_ptr) || tipc_node_has_active_routes(n_ptr)); | 255 | return tipc_node_has_active_links(n_ptr) || tipc_node_has_active_routes(n_ptr); |
256 | } | 256 | } |
257 | 257 | ||
258 | struct tipc_node *tipc_node_attach_link(struct link *l_ptr) | 258 | struct tipc_node *tipc_node_attach_link(struct link *l_ptr) |
diff --git a/net/tipc/port.h b/net/tipc/port.h index 8d1652aab298..e74bd9563739 100644 --- a/net/tipc/port.h +++ b/net/tipc/port.h | |||
@@ -157,7 +157,7 @@ static inline u32 tipc_peer_node(struct port *p_ptr) | |||
157 | 157 | ||
158 | static inline int tipc_port_congested(struct port *p_ptr) | 158 | static inline int tipc_port_congested(struct port *p_ptr) |
159 | { | 159 | { |
160 | return((p_ptr->sent - p_ptr->acked) >= (TIPC_FLOW_CONTROL_WIN * 2)); | 160 | return (p_ptr->sent - p_ptr->acked) >= (TIPC_FLOW_CONTROL_WIN * 2); |
161 | } | 161 | } |
162 | 162 | ||
163 | /** | 163 | /** |
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index f7ac94de24fe..33217fc3d697 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -1195,7 +1195,7 @@ static int rx_queue_full(struct tipc_msg *msg, u32 queue_size, u32 base) | |||
1195 | if (msg_connected(msg)) | 1195 | if (msg_connected(msg)) |
1196 | threshold *= 4; | 1196 | threshold *= 4; |
1197 | 1197 | ||
1198 | return (queue_size >= threshold); | 1198 | return queue_size >= threshold; |
1199 | } | 1199 | } |
1200 | 1200 | ||
1201 | /** | 1201 | /** |
diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c index ab6eab4c45e2..1a5b9a6bd128 100644 --- a/net/tipc/subscr.c +++ b/net/tipc/subscr.c | |||
@@ -604,6 +604,6 @@ int tipc_ispublished(struct tipc_name const *name) | |||
604 | { | 604 | { |
605 | u32 domain = 0; | 605 | u32 domain = 0; |
606 | 606 | ||
607 | return(tipc_nametbl_translate(name->type, name->instance,&domain) != 0); | 607 | return tipc_nametbl_translate(name->type, name->instance, &domain) != 0; |
608 | } | 608 | } |
609 | 609 | ||
diff --git a/net/wireless/core.h b/net/wireless/core.h index 37580e090a3d..5d89310b3587 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h | |||
@@ -86,7 +86,7 @@ struct cfg80211_registered_device *wiphy_to_dev(struct wiphy *wiphy) | |||
86 | static inline | 86 | static inline |
87 | bool wiphy_idx_valid(int wiphy_idx) | 87 | bool wiphy_idx_valid(int wiphy_idx) |
88 | { | 88 | { |
89 | return (wiphy_idx >= 0); | 89 | return wiphy_idx >= 0; |
90 | } | 90 | } |
91 | 91 | ||
92 | 92 | ||