diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/atmdev.h | 2 | ||||
-rw-r--r-- | include/linux/etherdevice.h | 4 | ||||
-rw-r--r-- | include/linux/netdevice.h | 2 | ||||
-rw-r--r-- | include/linux/skbuff.h | 6 | ||||
-rw-r--r-- | include/net/bluetooth/hci_core.h | 2 | ||||
-rw-r--r-- | include/net/bluetooth/l2cap.h | 2 | ||||
-rw-r--r-- | include/net/inet_ecn.h | 2 | ||||
-rw-r--r-- | include/net/ip.h | 4 | ||||
-rw-r--r-- | include/net/ipv6.h | 35 | ||||
-rw-r--r-- | include/net/irda/irlap.h | 2 | ||||
-rw-r--r-- | include/net/irda/irlmp.h | 2 | ||||
-rw-r--r-- | include/net/irda/irttp.h | 2 | ||||
-rw-r--r-- | include/net/sch_generic.h | 2 | ||||
-rw-r--r-- | include/net/sctp/sctp.h | 12 | ||||
-rw-r--r-- | include/net/sctp/sm.h | 10 | ||||
-rw-r--r-- | include/net/sctp/structs.h | 2 | ||||
-rw-r--r-- | include/net/sctp/tsnmap.h | 2 | ||||
-rw-r--r-- | include/net/tipc/tipc_msg.h | 10 |
18 files changed, 51 insertions, 52 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) |