aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-09-22 16:43:57 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-23 17:33:39 -0400
commita02cec2155fbea457eca8881870fd2de1a4c4c76 (patch)
treecfbfc4b32bfe10f9cd803d46c31607d13f1858f5 /include/net/sctp
parent6a08d194ee40806e0ccd5f36ed768e64cbfc979f (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>
Diffstat (limited to 'include/net/sctp')
-rw-r--r--include/net/sctp/sctp.h12
-rw-r--r--include/net/sctp/sm.h10
-rw-r--r--include/net/sctp/structs.h2
-rw-r--r--include/net/sctp/tsnmap.h2
4 files changed, 13 insertions, 13 deletions
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. */
406static inline sctp_assoc_t sctp_assoc2id(const struct sctp_association *asoc) 406static 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. */
474static inline int sctp_list_single_entry(struct list_head *head) 474static 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. */
632static inline int sctp_phashfn(__u16 lport) 632static 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. */
638static inline int sctp_ep_hashfn(__u16 lport) 638static 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
346static inline int TSN_lt(__u32 s, __u32 t) 346static 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
351static inline int TSN_lte(__u32 s, __u32 t) 351static 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
370static inline int SSN_lt(__u16 s, __u16 t) 370static 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
375static inline int SSN_lte(__u16 s, __u16 t) 375static 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
389static inline int ADDIP_SERIAL_gte(__u16 s, __u16 t) 389static 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
848static inline int sctp_packet_empty(struct sctp_packet *packet) 848static 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? */
158static inline int sctp_tsnmap_has_gap(const struct sctp_tsnmap *map) 158static 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