Commit a02cec2155fbea457eca8881870fd2de1a4c4c76
Committed by
David S. Miller
1 parent
6a08d194ee
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>
Showing 84 changed files with 220 additions and 222 deletions Side-by-side Diff
- include/linux/atmdev.h
- include/linux/etherdevice.h
- include/linux/netdevice.h
- include/linux/skbuff.h
- include/net/bluetooth/hci_core.h
- include/net/bluetooth/l2cap.h
- include/net/inet_ecn.h
- include/net/ip.h
- include/net/ipv6.h
- include/net/irda/irlap.h
- include/net/irda/irlmp.h
- include/net/irda/irttp.h
- include/net/sch_generic.h
- include/net/sctp/sctp.h
- include/net/sctp/sm.h
- include/net/sctp/structs.h
- include/net/sctp/tsnmap.h
- include/net/tipc/tipc_msg.h
- net/802/fc.c
- net/802/fddi.c
- net/802/hippi.c
- net/802/tr.c
- net/8021q/vlan_core.c
- net/9p/client.c
- net/bluetooth/rfcomm/core.c
- net/core/flow.c
- net/core/neighbour.c
- net/core/utils.c
- net/dccp/ccids/lib/loss_interval.c
- net/econet/af_econet.c
- net/ethernet/eth.c
- net/ipv4/arp.c
- net/ipv4/datagram.c
- net/ipv4/inet_diag.c
- net/ipv4/ip_fragment.c
- net/ipv4/ip_gre.c
- net/ipv4/netfilter/arp_tables.c
- net/ipv4/route.c
- net/ipv4/tcp_input.c
- net/ipv4/tcp_minisocks.c
- net/ipv4/tcp_output.c
- net/ipv4/tcp_westwood.c
- net/ipv6/addrconf.c
- net/ipv6/addrlabel.c
- net/ipv6/af_inet6.c
- net/ipv6/exthdrs_core.c
- net/ipv6/ip6_output.c
- net/ipv6/ndisc.c
- net/ipv6/netfilter/ip6_tables.c
- net/ipv6/raw.c
- net/ipv6/route.c
- net/ipv6/tcp_ipv6.c
- net/ipv6/xfrm6_policy.c
- net/irda/af_irda.c
- net/irda/discovery.c
- net/irda/ircomm/ircomm_tty.c
- net/irda/irlmp.c
- net/irda/irlmp_frame.c
- net/irda/irnet/irnet_irda.c
- net/irda/irnet/irnet_ppp.c
- net/key/af_key.c
- net/mac80211/rate.c
- net/rfkill/input.c
- net/rose/rose_link.c
- net/sctp/protocol.c
- net/sctp/socket.c
- net/sunrpc/auth_gss/auth_gss.c
- net/sunrpc/auth_gss/gss_generic_token.c
- net/sunrpc/auth_gss/gss_krb5_seqnum.c
- net/sunrpc/auth_gss/gss_mech_switch.c
- net/sunrpc/sched.c
- net/tipc/addr.c
- net/tipc/bcast.c
- net/tipc/bearer.c
- net/tipc/dbg.c
- net/tipc/link.c
- net/tipc/link.h
- net/tipc/msg.h
- net/tipc/name_table.c
- net/tipc/node.c
- net/tipc/port.h
- net/tipc/socket.c
- net/tipc/subscr.c
- net/wireless/core.h
include/linux/atmdev.h
include/linux/etherdevice.h
... | ... | @@ -71,7 +71,7 @@ |
71 | 71 | */ |
72 | 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 @@ |
82 | 82 | */ |
83 | 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 | /** |
include/linux/netdevice.h
... | ... | @@ -1676,7 +1676,7 @@ |
1676 | 1676 | */ |
1677 | 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 | 1682 | extern void netif_set_real_num_tx_queues(struct net_device *dev, |
include/linux/skbuff.h
... | ... | @@ -601,7 +601,7 @@ |
601 | 601 | static inline bool skb_queue_is_last(const struct sk_buff_head *list, |
602 | 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 @@ |
614 | 614 | static inline bool skb_queue_is_first(const struct sk_buff_head *list, |
615 | 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 @@ |
2156 | 2156 | |
2157 | 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 | 2162 | extern u16 skb_tx_hash(const struct net_device *dev, |
include/net/bluetooth/hci_core.h
... | ... | @@ -233,7 +233,7 @@ |
233 | 233 | static inline int inquiry_cache_empty(struct hci_dev *hdev) |
234 | 234 | { |
235 | 235 | struct inquiry_cache *c = &hdev->inq_cache; |
236 | - return (c->list == NULL); | |
236 | + return c->list == NULL; | |
237 | 237 | } |
238 | 238 | |
239 | 239 | static inline long inquiry_cache_age(struct hci_dev *hdev) |
include/net/bluetooth/l2cap.h
include/net/inet_ecn.h
include/net/ip.h
... | ... | @@ -238,9 +238,9 @@ |
238 | 238 | static inline |
239 | 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 | 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 | 246 | extern void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more); |
include/net/ipv6.h
... | ... | @@ -262,7 +262,7 @@ |
262 | 262 | |
263 | 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 | 268 | static inline int ipv6_addr_src_scope(const struct in6_addr *addr) |
... | ... | @@ -279,10 +279,10 @@ |
279 | 279 | ipv6_masked_addr_cmp(const struct in6_addr *a1, const struct in6_addr *m, |
280 | 280 | const struct in6_addr *a2) |
281 | 281 | { |
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]) | | |
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]))); | |
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]) | | |
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])); | |
286 | 286 | } |
287 | 287 | |
288 | 288 | static inline void ipv6_addr_copy(struct in6_addr *a1, const struct in6_addr *a2) |
... | ... | @@ -317,10 +317,10 @@ |
317 | 317 | static inline int ipv6_addr_equal(const struct in6_addr *a1, |
318 | 318 | const struct in6_addr *a2) |
319 | 319 | { |
320 | - return (((a1->s6_addr32[0] ^ a2->s6_addr32[0]) | | |
321 | - (a1->s6_addr32[1] ^ a2->s6_addr32[1]) | | |
322 | - (a1->s6_addr32[2] ^ a2->s6_addr32[2]) | | |
323 | - (a1->s6_addr32[3] ^ a2->s6_addr32[3])) == 0); | |
320 | + return ((a1->s6_addr32[0] ^ a2->s6_addr32[0]) | | |
321 | + (a1->s6_addr32[1] ^ a2->s6_addr32[1]) | | |
322 | + (a1->s6_addr32[2] ^ a2->s6_addr32[2]) | | |
323 | + (a1->s6_addr32[3] ^ a2->s6_addr32[3])) == 0; | |
324 | 324 | } |
325 | 325 | |
326 | 326 | static inline int __ipv6_prefix_equal(const __be32 *a1, const __be32 *a2, |
327 | 327 | |
328 | 328 | |
... | ... | @@ -373,20 +373,20 @@ |
373 | 373 | |
374 | 374 | static inline int ipv6_addr_any(const struct in6_addr *a) |
375 | 375 | { |
376 | - return ((a->s6_addr32[0] | a->s6_addr32[1] | | |
377 | - a->s6_addr32[2] | a->s6_addr32[3] ) == 0); | |
376 | + return (a->s6_addr32[0] | a->s6_addr32[1] | | |
377 | + a->s6_addr32[2] | a->s6_addr32[3]) == 0; | |
378 | 378 | } |
379 | 379 | |
380 | 380 | static inline int ipv6_addr_loopback(const struct in6_addr *a) |
381 | 381 | { |
382 | - return ((a->s6_addr32[0] | a->s6_addr32[1] | | |
383 | - a->s6_addr32[2] | (a->s6_addr32[3] ^ htonl(1))) == 0); | |
382 | + return (a->s6_addr32[0] | a->s6_addr32[1] | | |
383 | + a->s6_addr32[2] | (a->s6_addr32[3] ^ htonl(1))) == 0; | |
384 | 384 | } |
385 | 385 | |
386 | 386 | static inline int ipv6_addr_v4mapped(const struct in6_addr *a) |
387 | 387 | { |
388 | - return ((a->s6_addr32[0] | a->s6_addr32[1] | | |
389 | - (a->s6_addr32[2] ^ htonl(0x0000ffff))) == 0); | |
388 | + return (a->s6_addr32[0] | a->s6_addr32[1] | | |
389 | + (a->s6_addr32[2] ^ htonl(0x0000ffff))) == 0; | |
390 | 390 | } |
391 | 391 | |
392 | 392 | /* |
... | ... | @@ -395,8 +395,7 @@ |
395 | 395 | */ |
396 | 396 | static inline int ipv6_addr_orchid(const struct in6_addr *a) |
397 | 397 | { |
398 | - return ((a->s6_addr32[0] & htonl(0xfffffff0)) | |
399 | - == htonl(0x20010010)); | |
398 | + return (a->s6_addr32[0] & htonl(0xfffffff0)) == htonl(0x20010010); | |
400 | 399 | } |
401 | 400 | |
402 | 401 | static inline void ipv6_addr_set_v4mapped(const __be32 addr, |
... | ... | @@ -441,7 +440,7 @@ |
441 | 440 | * if returned value is greater than prefix length. |
442 | 441 | * --ANK (980803) |
443 | 442 | */ |
444 | - return (addrlen << 5); | |
443 | + return addrlen << 5; | |
445 | 444 | } |
446 | 445 | |
447 | 446 | static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_addr *a2) |
include/net/irda/irlap.h
include/net/irda/irlmp.h
... | ... | @@ -274,7 +274,7 @@ |
274 | 274 | if (self->lap->irlap == NULL) |
275 | 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 | 280 | /* After doing a irlmp_dup(), this get one of the two socket back into |
include/net/irda/irttp.h
include/net/sch_generic.h
include/net/sctp/sctp.h
... | ... | @@ -405,7 +405,7 @@ |
405 | 405 | /* Map an association to an assoc_id. */ |
406 | 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 | 411 | /* Look up the association by its id. */ |
... | ... | @@ -473,7 +473,7 @@ |
473 | 473 | /* Tests if the list has one and only one entry. */ |
474 | 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 | 479 | /* Generate a random jitter in the range of -50% ~ +50% of input RTO. */ |
480 | 480 | |
... | ... | @@ -631,13 +631,13 @@ |
631 | 631 | /* This is the hash function for the SCTP port hash table. */ |
632 | 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 | 637 | /* This is the hash function for the endpoint hash table. */ |
638 | 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 | 643 | /* This is the hash function for the association hash table. */ |
... | ... | @@ -645,7 +645,7 @@ |
645 | 645 | { |
646 | 646 | int h = (lport << 16) + rport; |
647 | 647 | h ^= h>>8; |
648 | - return (h & (sctp_assoc_hashsize - 1)); | |
648 | + return h & (sctp_assoc_hashsize - 1); | |
649 | 649 | } |
650 | 650 | |
651 | 651 | /* This is the hash function for the association hash table. This is |
... | ... | @@ -656,7 +656,7 @@ |
656 | 656 | { |
657 | 657 | int h = (lport << 16) + rport; |
658 | 658 | h ^= vtag; |
659 | - return (h & (sctp_assoc_hashsize-1)); | |
659 | + return h & (sctp_assoc_hashsize - 1); | |
660 | 660 | } |
661 | 661 | |
662 | 662 | #define sctp_for_each_hentry(epb, node, head) \ |
include/net/sctp/sm.h
... | ... | @@ -345,12 +345,12 @@ |
345 | 345 | |
346 | 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 | 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 | 356 | /* Compare two SSNs */ |
357 | 357 | |
... | ... | @@ -369,12 +369,12 @@ |
369 | 369 | |
370 | 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 | 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 @@ |
388 | 388 | |
389 | 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 | 394 | /* Check VTAG of the packet matches the sender's own tag. */ |
include/net/sctp/structs.h
include/net/sctp/tsnmap.h
... | ... | @@ -157,7 +157,7 @@ |
157 | 157 | /* Is there a gap in the TSN map? */ |
158 | 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 | 163 | /* Mark a duplicate TSN. Note: limit the storage of duplicate TSN |
include/net/tipc/tipc_msg.h
... | ... | @@ -107,7 +107,7 @@ |
107 | 107 | |
108 | 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 | 113 | static inline u32 msg_size(struct tipc_msg *m) |
... | ... | @@ -117,7 +117,7 @@ |
117 | 117 | |
118 | 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 | 123 | static inline unchar *msg_data(struct tipc_msg *m) |
124 | 124 | |
125 | 125 | |
... | ... | @@ -132,17 +132,17 @@ |
132 | 132 | |
133 | 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 | 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 | 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 | 148 | static inline u32 msg_errcode(struct tipc_msg *m) |
net/802/fc.c
net/802/fddi.c
... | ... | @@ -82,10 +82,10 @@ |
82 | 82 | if (daddr != NULL) |
83 | 83 | { |
84 | 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 @@ |
108 | 108 | { |
109 | 109 | printk("%s: Don't know how to resolve type %04X addresses.\n", |
110 | 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 @@ |
162 | 162 | |
163 | 163 | /* Assume 802.2 SNAP frames, for now */ |
164 | 164 | |
165 | - return(type); | |
165 | + return type; | |
166 | 166 | } |
167 | 167 | |
168 | 168 | EXPORT_SYMBOL(fddi_type_trans); |
169 | 169 | |
... | ... | @@ -170,9 +170,9 @@ |
170 | 170 | int fddi_change_mtu(struct net_device *dev, int new_mtu) |
171 | 171 | { |
172 | 172 | if ((new_mtu < FDDI_K_SNAP_HLEN) || (new_mtu > FDDI_K_SNAP_DLEN)) |
173 | - return(-EINVAL); | |
173 | + return -EINVAL; | |
174 | 174 | dev->mtu = new_mtu; |
175 | - return(0); | |
175 | + return 0; | |
176 | 176 | } |
177 | 177 | EXPORT_SYMBOL(fddi_change_mtu); |
178 | 178 |
net/802/hippi.c
net/802/tr.c
net/8021q/vlan_core.c
net/9p/client.c
... | ... | @@ -61,13 +61,13 @@ |
61 | 61 | |
62 | 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 | 66 | EXPORT_SYMBOL(p9_is_proto_dotl); |
67 | 67 | |
68 | 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 | 72 | EXPORT_SYMBOL(p9_is_proto_dotu); |
73 | 73 |
net/bluetooth/rfcomm/core.c
... | ... | @@ -179,13 +179,13 @@ |
179 | 179 | /* FCS on 2 bytes */ |
180 | 180 | static inline u8 __fcs(u8 *data) |
181 | 181 | { |
182 | - return (0xff - __crc(data)); | |
182 | + return 0xff - __crc(data); | |
183 | 183 | } |
184 | 184 | |
185 | 185 | /* FCS on 3 bytes */ |
186 | 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 | 191 | /* Check FCS */ |
net/core/flow.c
... | ... | @@ -176,8 +176,8 @@ |
176 | 176 | { |
177 | 177 | u32 *k = (u32 *) key; |
178 | 178 | |
179 | - return (jhash2(k, (sizeof(*key) / sizeof(u32)), fcp->hash_rnd) | |
180 | - & (flow_cache_hash_size(fc) - 1)); | |
179 | + return jhash2(k, (sizeof(*key) / sizeof(u32)), fcp->hash_rnd) | |
180 | + & (flow_cache_hash_size(fc) - 1); | |
181 | 181 | } |
182 | 182 | |
183 | 183 | typedef unsigned long flow_compare_t; |
net/core/neighbour.c
... | ... | @@ -122,7 +122,7 @@ |
122 | 122 | |
123 | 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 | 127 | EXPORT_SYMBOL(neigh_rand_reach_time); |
128 | 128 | |
129 | 129 | |
... | ... | @@ -766,9 +766,9 @@ |
766 | 766 | static __inline__ int neigh_max_probes(struct neighbour *n) |
767 | 767 | { |
768 | 768 | struct neigh_parms *p = n->parms; |
769 | - return (n->nud_state & NUD_PROBE ? | |
769 | + return (n->nud_state & NUD_PROBE) ? | |
770 | 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 | 774 | static void neigh_invalidate(struct neighbour *neigh) |
net/core/utils.c
net/dccp/ccids/lib/loss_interval.c
net/econet/af_econet.c
... | ... | @@ -392,7 +392,7 @@ |
392 | 392 | dev_queue_xmit(skb); |
393 | 393 | dev_put(dev); |
394 | 394 | mutex_unlock(&econet_mutex); |
395 | - return(len); | |
395 | + return len; | |
396 | 396 | |
397 | 397 | out_free: |
398 | 398 | kfree_skb(skb); |
... | ... | @@ -637,7 +637,7 @@ |
637 | 637 | eo->num = protocol; |
638 | 638 | |
639 | 639 | econet_insert_socket(&econet_sklist, sk); |
640 | - return(0); | |
640 | + return 0; | |
641 | 641 | out: |
642 | 642 | return err; |
643 | 643 | } |
net/ethernet/eth.c
net/ipv4/arp.c
net/ipv4/datagram.c
net/ipv4/inet_diag.c
net/ipv4/ip_fragment.c
... | ... | @@ -116,11 +116,11 @@ |
116 | 116 | struct ip4_create_arg *arg = a; |
117 | 117 | |
118 | 118 | qp = container_of(q, struct ipq, q); |
119 | - return (qp->id == arg->iph->id && | |
119 | + return qp->id == arg->iph->id && | |
120 | 120 | qp->saddr == arg->iph->saddr && |
121 | 121 | qp->daddr == arg->iph->daddr && |
122 | 122 | qp->protocol == arg->iph->protocol && |
123 | - qp->user == arg->user); | |
123 | + qp->user == arg->user; | |
124 | 124 | } |
125 | 125 | |
126 | 126 | /* Memory Tracking Functions. */ |
net/ipv4/ip_gre.c
net/ipv4/netfilter/arp_tables.c
net/ipv4/route.c
net/ipv4/tcp_input.c
... | ... | @@ -2301,7 +2301,7 @@ |
2301 | 2301 | |
2302 | 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 | 2307 | static inline int tcp_head_timedout(struct sock *sk) |
... | ... | @@ -3398,8 +3398,8 @@ |
3398 | 3398 | |
3399 | 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) || | |
3402 | - inet_csk(sk)->icsk_ca_state != TCP_CA_Open); | |
3401 | + return !(flag & FLAG_NOT_DUP) || (flag & FLAG_CA_ALERT) || | |
3402 | + inet_csk(sk)->icsk_ca_state != TCP_CA_Open; | |
3403 | 3403 | } |
3404 | 3404 | |
3405 | 3405 | static inline int tcp_may_raise_cwnd(const struct sock *sk, const int flag) |
3406 | 3406 | |
... | ... | @@ -3416,9 +3416,9 @@ |
3416 | 3416 | const u32 ack, const u32 ack_seq, |
3417 | 3417 | const u32 nwin) |
3418 | 3418 | { |
3419 | - return (after(ack, tp->snd_una) || | |
3419 | + return after(ack, tp->snd_una) || | |
3420 | 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 | 3424 | /* Update our send window. |
net/ipv4/tcp_minisocks.c
net/ipv4/tcp_output.c
... | ... | @@ -1370,9 +1370,9 @@ |
1370 | 1370 | const struct sk_buff *skb, |
1371 | 1371 | unsigned mss_now, int nonagle) |
1372 | 1372 | { |
1373 | - return (skb->len < mss_now && | |
1373 | + return skb->len < mss_now && | |
1374 | 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 | 1378 | /* Return non-zero if the Nagle test allows this packet to be |
1379 | 1379 | |
... | ... | @@ -1443,10 +1443,10 @@ |
1443 | 1443 | struct tcp_sock *tp = tcp_sk(sk); |
1444 | 1444 | struct sk_buff *skb = tcp_send_head(sk); |
1445 | 1445 | |
1446 | - return (skb && | |
1446 | + return skb && | |
1447 | 1447 | tcp_snd_test(sk, skb, tcp_current_mss(sk), |
1448 | 1448 | (tcp_skb_is_last(sk, skb) ? |
1449 | - tp->nonagle : TCP_NAGLE_PUSH))); | |
1449 | + tp->nonagle : TCP_NAGLE_PUSH)); | |
1450 | 1450 | } |
1451 | 1451 | |
1452 | 1452 | /* Trim TSO SKB to LEN bytes, put the remaining data into a new packet |
net/ipv4/tcp_westwood.c
net/ipv6/addrconf.c
... | ... | @@ -243,7 +243,7 @@ |
243 | 243 | /* Check if a route is valid prefix route */ |
244 | 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 | 249 | static void addrconf_del_timer(struct inet6_ifaddr *ifp) |
net/ipv6/addrlabel.c
... | ... | @@ -513,10 +513,9 @@ |
513 | 513 | |
514 | 514 | static inline int ip6addrlbl_msgsize(void) |
515 | 515 | { |
516 | - return (NLMSG_ALIGN(sizeof(struct ifaddrlblmsg)) | |
516 | + return NLMSG_ALIGN(sizeof(struct ifaddrlblmsg)) | |
517 | 517 | + nla_total_size(16) /* IFAL_ADDRESS */ |
518 | - + nla_total_size(4) /* IFAL_LABEL */ | |
519 | - ); | |
518 | + + nla_total_size(4); /* IFAL_LABEL */ | |
520 | 519 | } |
521 | 520 | |
522 | 521 | static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr* nlh, |
net/ipv6/af_inet6.c
... | ... | @@ -467,7 +467,7 @@ |
467 | 467 | if (ipv6_addr_type(&sin->sin6_addr) & IPV6_ADDR_LINKLOCAL) |
468 | 468 | sin->sin6_scope_id = sk->sk_bound_dev_if; |
469 | 469 | *uaddr_len = sizeof(*sin); |
470 | - return(0); | |
470 | + return 0; | |
471 | 471 | } |
472 | 472 | |
473 | 473 | EXPORT_SYMBOL(inet6_getname); |
... | ... | @@ -488,7 +488,7 @@ |
488 | 488 | case SIOCADDRT: |
489 | 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 | 493 | case SIOCSIFADDR: |
494 | 494 | return addrconf_add_ifaddr(net, (void __user *) arg); |
... | ... | @@ -502,7 +502,7 @@ |
502 | 502 | return sk->sk_prot->ioctl(sk, cmd, arg); |
503 | 503 | } |
504 | 504 | /*NOTREACHED*/ |
505 | - return(0); | |
505 | + return 0; | |
506 | 506 | } |
507 | 507 | |
508 | 508 | EXPORT_SYMBOL(inet6_ioctl); |
net/ipv6/exthdrs_core.c
... | ... | @@ -13,12 +13,12 @@ |
13 | 13 | /* |
14 | 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 | 17 | (nexthdr == NEXTHDR_ROUTING) || |
18 | 18 | (nexthdr == NEXTHDR_FRAGMENT) || |
19 | 19 | (nexthdr == NEXTHDR_AUTH) || |
20 | 20 | (nexthdr == NEXTHDR_NONE) || |
21 | - (nexthdr == NEXTHDR_DEST) ); | |
21 | + (nexthdr == NEXTHDR_DEST); | |
22 | 22 | } |
23 | 23 | |
24 | 24 | /* |
net/ipv6/ip6_output.c
... | ... | @@ -870,8 +870,8 @@ |
870 | 870 | struct in6_addr *fl_addr, |
871 | 871 | struct in6_addr *addr_cache) |
872 | 872 | { |
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))); | |
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)); | |
875 | 875 | } |
876 | 876 | |
877 | 877 | static struct dst_entry *ip6_sk_dst_check(struct sock *sk, |
net/ipv6/ndisc.c
... | ... | @@ -228,12 +228,12 @@ |
228 | 228 | do { |
229 | 229 | cur = ((void *)cur) + (cur->nd_opt_len << 3); |
230 | 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 | 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 | 239 | static struct nd_opt_hdr *ndisc_next_useropt(struct nd_opt_hdr *cur, |
... | ... | @@ -244,7 +244,7 @@ |
244 | 244 | do { |
245 | 245 | cur = ((void *)cur) + (cur->nd_opt_len << 3); |
246 | 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 | 250 | static struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len, |
... | ... | @@ -319,7 +319,7 @@ |
319 | 319 | int prepad = ndisc_addr_option_pad(dev->type); |
320 | 320 | if (lladdrlen != NDISC_OPT_SPACE(dev->addr_len + prepad)) |
321 | 321 | return NULL; |
322 | - return (lladdr + prepad); | |
322 | + return lladdr + prepad; | |
323 | 323 | } |
324 | 324 | |
325 | 325 | int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int dir) |
net/ipv6/netfilter/ip6_tables.c
... | ... | @@ -82,13 +82,13 @@ |
82 | 82 | int |
83 | 83 | ip6t_ext_hdr(u8 nexthdr) |
84 | 84 | { |
85 | - return ( (nexthdr == IPPROTO_HOPOPTS) || | |
86 | - (nexthdr == IPPROTO_ROUTING) || | |
87 | - (nexthdr == IPPROTO_FRAGMENT) || | |
88 | - (nexthdr == IPPROTO_ESP) || | |
89 | - (nexthdr == IPPROTO_AH) || | |
90 | - (nexthdr == IPPROTO_NONE) || | |
91 | - (nexthdr == IPPROTO_DSTOPTS) ); | |
85 | + return (nexthdr == IPPROTO_HOPOPTS) || | |
86 | + (nexthdr == IPPROTO_ROUTING) || | |
87 | + (nexthdr == IPPROTO_FRAGMENT) || | |
88 | + (nexthdr == IPPROTO_ESP) || | |
89 | + (nexthdr == IPPROTO_AH) || | |
90 | + (nexthdr == IPPROTO_NONE) || | |
91 | + (nexthdr == IPPROTO_DSTOPTS); | |
92 | 92 | } |
93 | 93 | |
94 | 94 | /* Returns whether matches rule or not. */ |
net/ipv6/raw.c
... | ... | @@ -764,7 +764,7 @@ |
764 | 764 | return -EINVAL; |
765 | 765 | |
766 | 766 | if (sin6->sin6_family && sin6->sin6_family != AF_INET6) |
767 | - return(-EAFNOSUPPORT); | |
767 | + return -EAFNOSUPPORT; | |
768 | 768 | |
769 | 769 | /* port is the proto value [0..255] carried in nexthdr */ |
770 | 770 | proto = ntohs(sin6->sin6_port); |
771 | 771 | |
... | ... | @@ -772,10 +772,10 @@ |
772 | 772 | if (!proto) |
773 | 773 | proto = inet->inet_num; |
774 | 774 | else if (proto != inet->inet_num) |
775 | - return(-EINVAL); | |
775 | + return -EINVAL; | |
776 | 776 | |
777 | 777 | if (proto > 255) |
778 | - return(-EINVAL); | |
778 | + return -EINVAL; | |
779 | 779 | |
780 | 780 | daddr = &sin6->sin6_addr; |
781 | 781 | if (np->sndflow) { |
... | ... | @@ -985,7 +985,7 @@ |
985 | 985 | /* You may get strange result with a positive odd offset; |
986 | 986 | RFC2292bis agrees with me. */ |
987 | 987 | if (val > 0 && (val&1)) |
988 | - return(-EINVAL); | |
988 | + return -EINVAL; | |
989 | 989 | if (val < 0) { |
990 | 990 | rp->checksum = 0; |
991 | 991 | } else { |
... | ... | @@ -997,7 +997,7 @@ |
997 | 997 | break; |
998 | 998 | |
999 | 999 | default: |
1000 | - return(-ENOPROTOOPT); | |
1000 | + return -ENOPROTOOPT; | |
1001 | 1001 | } |
1002 | 1002 | } |
1003 | 1003 | |
... | ... | @@ -1190,7 +1190,7 @@ |
1190 | 1190 | default: |
1191 | 1191 | break; |
1192 | 1192 | } |
1193 | - return(0); | |
1193 | + return 0; | |
1194 | 1194 | } |
1195 | 1195 | |
1196 | 1196 | struct proto rawv6_prot = { |
net/ipv6/route.c
... | ... | @@ -217,14 +217,14 @@ |
217 | 217 | |
218 | 218 | static __inline__ int rt6_check_expired(const struct rt6_info *rt) |
219 | 219 | { |
220 | - return (rt->rt6i_flags & RTF_EXPIRES && | |
221 | - time_after(jiffies, rt->rt6i_expires)); | |
220 | + return (rt->rt6i_flags & RTF_EXPIRES) && | |
221 | + time_after(jiffies, rt->rt6i_expires); | |
222 | 222 | } |
223 | 223 | |
224 | 224 | static inline int rt6_need_strict(struct in6_addr *daddr) |
225 | 225 | { |
226 | - return (ipv6_addr_type(daddr) & | |
227 | - (IPV6_ADDR_MULTICAST | IPV6_ADDR_LINKLOCAL | IPV6_ADDR_LOOPBACK)); | |
226 | + return ipv6_addr_type(daddr) & | |
227 | + (IPV6_ADDR_MULTICAST | IPV6_ADDR_LINKLOCAL | IPV6_ADDR_LOOPBACK); | |
228 | 228 | } |
229 | 229 | |
230 | 230 | /* |
... | ... | @@ -440,7 +440,7 @@ |
440 | 440 | __func__, match); |
441 | 441 | |
442 | 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 | 446 | #ifdef CONFIG_IPV6_ROUTE_INFO |
... | ... | @@ -859,7 +859,7 @@ |
859 | 859 | |
860 | 860 | dst_release(*dstp); |
861 | 861 | *dstp = new; |
862 | - return (new ? 0 : -ENOMEM); | |
862 | + return new ? 0 : -ENOMEM; | |
863 | 863 | } |
864 | 864 | EXPORT_SYMBOL_GPL(ip6_dst_blackhole); |
865 | 865 | |
... | ... | @@ -1070,7 +1070,7 @@ |
1070 | 1070 | net->ipv6.ip6_rt_gc_expire = rt_gc_timeout>>1; |
1071 | 1071 | out: |
1072 | 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 | 1076 | /* Clean host part of a prefix. Not necessary in radix tree, |
net/ipv6/tcp_ipv6.c
net/ipv6/xfrm6_policy.c
... | ... | @@ -199,7 +199,7 @@ |
199 | 199 | struct net *net = container_of(ops, struct net, xfrm.xfrm6_dst_ops); |
200 | 200 | |
201 | 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 | 205 | static void xfrm6_update_pmtu(struct dst_entry *dst, u32 mtu) |
net/irda/af_irda.c
... | ... | @@ -573,9 +573,9 @@ |
573 | 573 | /* Requested object/attribute doesn't exist */ |
574 | 574 | if((self->errno == IAS_CLASS_UNKNOWN) || |
575 | 575 | (self->errno == IAS_ATTRIB_UNKNOWN)) |
576 | - return (-EADDRNOTAVAIL); | |
576 | + return -EADDRNOTAVAIL; | |
577 | 577 | else |
578 | - return (-EHOSTUNREACH); | |
578 | + return -EHOSTUNREACH; | |
579 | 579 | } |
580 | 580 | |
581 | 581 | /* Get the remote TSAP selector */ |
... | ... | @@ -663,7 +663,7 @@ |
663 | 663 | __func__, name); |
664 | 664 | self->daddr = DEV_ADDR_ANY; |
665 | 665 | kfree(discoveries); |
666 | - return(-ENOTUNIQ); | |
666 | + return -ENOTUNIQ; | |
667 | 667 | } |
668 | 668 | /* First time we found that one, save it ! */ |
669 | 669 | daddr = self->daddr; |
... | ... | @@ -677,7 +677,7 @@ |
677 | 677 | IRDA_DEBUG(0, "%s(), unexpected IAS query failure\n", __func__); |
678 | 678 | self->daddr = DEV_ADDR_ANY; |
679 | 679 | kfree(discoveries); |
680 | - return(-EHOSTUNREACH); | |
680 | + return -EHOSTUNREACH; | |
681 | 681 | break; |
682 | 682 | } |
683 | 683 | } |
... | ... | @@ -689,7 +689,7 @@ |
689 | 689 | IRDA_DEBUG(1, "%s(), cannot discover service ''%s'' in any device !!!\n", |
690 | 690 | __func__, name); |
691 | 691 | self->daddr = DEV_ADDR_ANY; |
692 | - return(-EADDRNOTAVAIL); | |
692 | + return -EADDRNOTAVAIL; | |
693 | 693 | } |
694 | 694 | |
695 | 695 | /* Revert back to discovered device & service */ |
696 | 696 | |
... | ... | @@ -2465,9 +2465,9 @@ |
2465 | 2465 | /* Requested object/attribute doesn't exist */ |
2466 | 2466 | if((self->errno == IAS_CLASS_UNKNOWN) || |
2467 | 2467 | (self->errno == IAS_ATTRIB_UNKNOWN)) |
2468 | - return (-EADDRNOTAVAIL); | |
2468 | + return -EADDRNOTAVAIL; | |
2469 | 2469 | else |
2470 | - return (-EHOSTUNREACH); | |
2470 | + return -EHOSTUNREACH; | |
2471 | 2471 | } |
2472 | 2472 | |
2473 | 2473 | /* Translate from internal to user structure */ |
net/irda/discovery.c
net/irda/ircomm/ircomm_tty.c
net/irda/irlmp.c
... | ... | @@ -939,7 +939,7 @@ |
939 | 939 | } |
940 | 940 | |
941 | 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 | 944 | EXPORT_SYMBOL(irlmp_get_discoveries); |
945 | 945 |
net/irda/irlmp_frame.c
net/irda/irnet/irnet_irda.c
... | ... | @@ -238,7 +238,7 @@ |
238 | 238 | DEXIT(IRDA_SR_TRACE, "\n"); |
239 | 239 | |
240 | 240 | /* Return the TSAP */ |
241 | - return(dtsap_sel); | |
241 | + return dtsap_sel; | |
242 | 242 | } |
243 | 243 | |
244 | 244 | /*------------------------------------------------------------------*/ |
... | ... | @@ -301,7 +301,7 @@ |
301 | 301 | { |
302 | 302 | clear_bit(0, &self->ttp_connect); |
303 | 303 | DERROR(IRDA_SR_ERROR, "connect aborted!\n"); |
304 | - return(err); | |
304 | + return err; | |
305 | 305 | } |
306 | 306 | |
307 | 307 | /* Connect to remote device */ |
... | ... | @@ -312,7 +312,7 @@ |
312 | 312 | { |
313 | 313 | clear_bit(0, &self->ttp_connect); |
314 | 314 | DERROR(IRDA_SR_ERROR, "connect aborted!\n"); |
315 | - return(err); | |
315 | + return err; | |
316 | 316 | } |
317 | 317 | |
318 | 318 | /* The above call is non-blocking. |
... | ... | @@ -321,7 +321,7 @@ |
321 | 321 | * See you there ;-) */ |
322 | 322 | |
323 | 323 | DEXIT(IRDA_SR_TRACE, "\n"); |
324 | - return(err); | |
324 | + return err; | |
325 | 325 | } |
326 | 326 | |
327 | 327 | /*------------------------------------------------------------------*/ |
328 | 328 | |
... | ... | @@ -362,10 +362,10 @@ |
362 | 362 | /* The above request is non-blocking. |
363 | 363 | * After a while, IrDA will call us back in irnet_discovervalue_confirm() |
364 | 364 | * We will then call irnet_ias_to_tsap() and come back here again... */ |
365 | - return(0); | |
365 | + return 0; | |
366 | 366 | } |
367 | 367 | else |
368 | - return(1); | |
368 | + return 1; | |
369 | 369 | } |
370 | 370 | |
371 | 371 | /*------------------------------------------------------------------*/ |
... | ... | @@ -436,7 +436,7 @@ |
436 | 436 | /* Follow me in irnet_discovervalue_confirm() */ |
437 | 437 | |
438 | 438 | DEXIT(IRDA_SR_TRACE, "\n"); |
439 | - return(0); | |
439 | + return 0; | |
440 | 440 | } |
441 | 441 | |
442 | 442 | /*------------------------------------------------------------------*/ |
... | ... | @@ -485,7 +485,7 @@ |
485 | 485 | /* No luck ! */ |
486 | 486 | DEBUG(IRDA_SR_INFO, "cannot discover device ``%s'' !!!\n", self->rname); |
487 | 487 | kfree(discoveries); |
488 | - return(-EADDRNOTAVAIL); | |
488 | + return -EADDRNOTAVAIL; | |
489 | 489 | } |
490 | 490 | |
491 | 491 | |
... | ... | @@ -527,7 +527,7 @@ |
527 | 527 | INIT_WORK(&self->disconnect_work, irnet_ppp_disconnect); |
528 | 528 | |
529 | 529 | DEXIT(IRDA_SOCK_TRACE, "\n"); |
530 | - return(0); | |
530 | + return 0; | |
531 | 531 | } |
532 | 532 | |
533 | 533 | /*------------------------------------------------------------------*/ |
... | ... | @@ -601,7 +601,7 @@ |
601 | 601 | * We will finish the connection procedure in irnet_connect_tsap(). |
602 | 602 | */ |
603 | 603 | DEXIT(IRDA_SOCK_TRACE, "\n"); |
604 | - return(0); | |
604 | + return 0; | |
605 | 605 | } |
606 | 606 | |
607 | 607 | /*------------------------------------------------------------------*/ |
... | ... | @@ -733,7 +733,7 @@ |
733 | 733 | /* No luck ! */ |
734 | 734 | DEXIT(IRDA_SERV_INFO, ": cannot discover device 0x%08x !!!\n", self->daddr); |
735 | 735 | kfree(discoveries); |
736 | - return(-EADDRNOTAVAIL); | |
736 | + return -EADDRNOTAVAIL; | |
737 | 737 | } |
738 | 738 | |
739 | 739 | /*------------------------------------------------------------------*/ |
net/irda/irnet/irnet_ppp.c
... | ... | @@ -166,7 +166,7 @@ |
166 | 166 | } |
167 | 167 | |
168 | 168 | /* Success : we have parsed all commands successfully */ |
169 | - return(count); | |
169 | + return count; | |
170 | 170 | } |
171 | 171 | |
172 | 172 | #ifdef INITIAL_DISCOVERY |
... | ... | @@ -300,7 +300,7 @@ |
300 | 300 | } |
301 | 301 | |
302 | 302 | DEXIT(CTRL_TRACE, "\n"); |
303 | - return(strlen(event)); | |
303 | + return strlen(event); | |
304 | 304 | } |
305 | 305 | #endif /* INITIAL_DISCOVERY */ |
306 | 306 | |
... | ... | @@ -409,7 +409,7 @@ |
409 | 409 | } |
410 | 410 | |
411 | 411 | DEXIT(CTRL_TRACE, "\n"); |
412 | - return(strlen(event)); | |
412 | + return strlen(event); | |
413 | 413 | } |
414 | 414 | |
415 | 415 | /*------------------------------------------------------------------*/ |
... | ... | @@ -623,7 +623,7 @@ |
623 | 623 | mask |= irnet_ctrl_poll(ap, file, wait); |
624 | 624 | |
625 | 625 | DEXIT(FS_TRACE, " - mask=0x%X\n", mask); |
626 | - return(mask); | |
626 | + return mask; | |
627 | 627 | } |
628 | 628 | |
629 | 629 | /*------------------------------------------------------------------*/ |
net/key/af_key.c
... | ... | @@ -565,12 +565,12 @@ |
565 | 565 | |
566 | 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 | 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 | 576 | static inline int pfkey_sockaddr_len(sa_family_t family) |
net/mac80211/rate.c
... | ... | @@ -207,7 +207,7 @@ |
207 | 207 | |
208 | 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 | 213 | static void rc_send_low_broadcast(s8 *idx, u32 basic_rates, u8 max_rate_idx) |
net/rfkill/input.c
... | ... | @@ -142,7 +142,7 @@ |
142 | 142 | static unsigned long rfkill_ratelimit(const unsigned long last) |
143 | 143 | { |
144 | 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 | 148 | static void rfkill_schedule_ratelimited(void) |
net/rose/rose_link.c
... | ... | @@ -114,7 +114,7 @@ |
114 | 114 | if (ax25s) |
115 | 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 @@ |
137 | 137 | if (ax25s) |
138 | 138 | ax25_cb_put(ax25s); |
139 | 139 | |
140 | - return (neigh->ax25 != NULL); | |
140 | + return neigh->ax25 != NULL; | |
141 | 141 | } |
142 | 142 | |
143 | 143 | /* |
net/sctp/protocol.c
... | ... | @@ -799,7 +799,7 @@ |
799 | 799 | static int sctp_inet_af_supported(sa_family_t family, struct sctp_sock *sp) |
800 | 800 | { |
801 | 801 | /* PF_INET only supports AF_INET addresses. */ |
802 | - return (AF_INET == family); | |
802 | + return AF_INET == family; | |
803 | 803 | } |
804 | 804 | |
805 | 805 | /* Address matching with wildcards allowed. */ |
net/sctp/socket.c
... | ... | @@ -3884,7 +3884,7 @@ |
3884 | 3884 | } |
3885 | 3885 | |
3886 | 3886 | out: |
3887 | - return (retval); | |
3887 | + return retval; | |
3888 | 3888 | } |
3889 | 3889 | |
3890 | 3890 | |
... | ... | @@ -3940,7 +3940,7 @@ |
3940 | 3940 | } |
3941 | 3941 | |
3942 | 3942 | out: |
3943 | - return (retval); | |
3943 | + return retval; | |
3944 | 3944 | } |
3945 | 3945 | |
3946 | 3946 | /* 7.1.12 Enable/Disable message fragmentation (SCTP_DISABLE_FRAGMENTS) |
... | ... | @@ -5594,7 +5594,7 @@ |
5594 | 5594 | /* Note: sk->sk_num gets filled in if ephemeral port request. */ |
5595 | 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 | /* |
net/sunrpc/auth_gss/auth_gss.c
net/sunrpc/auth_gss/gss_generic_token.c
... | ... | @@ -76,19 +76,19 @@ |
76 | 76 | der_length_size( int length) |
77 | 77 | { |
78 | 78 | if (length < (1<<7)) |
79 | - return(1); | |
79 | + return 1; | |
80 | 80 | else if (length < (1<<8)) |
81 | - return(2); | |
81 | + return 2; | |
82 | 82 | #if (SIZEOF_INT == 2) |
83 | 83 | else |
84 | - return(3); | |
84 | + return 3; | |
85 | 85 | #else |
86 | 86 | else if (length < (1<<16)) |
87 | - return(3); | |
87 | + return 3; | |
88 | 88 | else if (length < (1<<24)) |
89 | - return(4); | |
89 | + return 4; | |
90 | 90 | else |
91 | - return(5); | |
91 | + return 5; | |
92 | 92 | #endif |
93 | 93 | } |
94 | 94 | |
95 | 95 | |
96 | 96 | |
... | ... | @@ -121,14 +121,14 @@ |
121 | 121 | int ret; |
122 | 122 | |
123 | 123 | if (*bufsize < 1) |
124 | - return(-1); | |
124 | + return -1; | |
125 | 125 | sf = *(*buf)++; |
126 | 126 | (*bufsize)--; |
127 | 127 | if (sf & 0x80) { |
128 | 128 | if ((sf &= 0x7f) > ((*bufsize)-1)) |
129 | - return(-1); | |
129 | + return -1; | |
130 | 130 | if (sf > SIZEOF_INT) |
131 | - return (-1); | |
131 | + return -1; | |
132 | 132 | ret = 0; |
133 | 133 | for (; sf; sf--) { |
134 | 134 | ret = (ret<<8) + (*(*buf)++); |
... | ... | @@ -138,7 +138,7 @@ |
138 | 138 | ret = sf; |
139 | 139 | } |
140 | 140 | |
141 | - return(ret); | |
141 | + return ret; | |
142 | 142 | } |
143 | 143 | |
144 | 144 | /* returns the length of a token, given the mech oid and the body size */ |
... | ... | @@ -148,7 +148,7 @@ |
148 | 148 | { |
149 | 149 | /* set body_size to sequence contents size */ |
150 | 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 | 154 | EXPORT_SYMBOL_GPL(g_token_size); |
155 | 155 | |
156 | 156 | |
157 | 157 | |
158 | 158 | |
159 | 159 | |
160 | 160 | |
161 | 161 | |
... | ... | @@ -186,27 +186,27 @@ |
186 | 186 | int ret = 0; |
187 | 187 | |
188 | 188 | if ((toksize-=1) < 0) |
189 | - return(G_BAD_TOK_HEADER); | |
189 | + return G_BAD_TOK_HEADER; | |
190 | 190 | if (*buf++ != 0x60) |
191 | - return(G_BAD_TOK_HEADER); | |
191 | + return G_BAD_TOK_HEADER; | |
192 | 192 | |
193 | 193 | if ((seqsize = der_read_length(&buf, &toksize)) < 0) |
194 | - return(G_BAD_TOK_HEADER); | |
194 | + return G_BAD_TOK_HEADER; | |
195 | 195 | |
196 | 196 | if (seqsize != toksize) |
197 | - return(G_BAD_TOK_HEADER); | |
197 | + return G_BAD_TOK_HEADER; | |
198 | 198 | |
199 | 199 | if ((toksize-=1) < 0) |
200 | - return(G_BAD_TOK_HEADER); | |
200 | + return G_BAD_TOK_HEADER; | |
201 | 201 | if (*buf++ != 0x06) |
202 | - return(G_BAD_TOK_HEADER); | |
202 | + return G_BAD_TOK_HEADER; | |
203 | 203 | |
204 | 204 | if ((toksize-=1) < 0) |
205 | - return(G_BAD_TOK_HEADER); | |
205 | + return G_BAD_TOK_HEADER; | |
206 | 206 | toid.len = *buf++; |
207 | 207 | |
208 | 208 | if ((toksize-=toid.len) < 0) |
209 | - return(G_BAD_TOK_HEADER); | |
209 | + return G_BAD_TOK_HEADER; | |
210 | 210 | toid.data = buf; |
211 | 211 | buf+=toid.len; |
212 | 212 | |
213 | 213 | |
214 | 214 | |
... | ... | @@ -217,17 +217,17 @@ |
217 | 217 | to return G_BAD_TOK_HEADER if the token header is in fact bad */ |
218 | 218 | |
219 | 219 | if ((toksize-=2) < 0) |
220 | - return(G_BAD_TOK_HEADER); | |
220 | + return G_BAD_TOK_HEADER; | |
221 | 221 | |
222 | 222 | if (ret) |
223 | - return(ret); | |
223 | + return ret; | |
224 | 224 | |
225 | 225 | if (!ret) { |
226 | 226 | *buf_in = buf; |
227 | 227 | *body_size = toksize; |
228 | 228 | } |
229 | 229 | |
230 | - return(ret); | |
230 | + return ret; | |
231 | 231 | } |
232 | 232 | |
233 | 233 | EXPORT_SYMBOL_GPL(g_verify_token_header); |
net/sunrpc/auth_gss/gss_krb5_seqnum.c
net/sunrpc/auth_gss/gss_mech_switch.c
net/sunrpc/sched.c
net/tipc/addr.c
net/tipc/bcast.c
net/tipc/bearer.c
net/tipc/dbg.c
... | ... | @@ -134,7 +134,7 @@ |
134 | 134 | |
135 | 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 @@ |
169 | 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 | /** |
net/tipc/link.c
... | ... | @@ -239,13 +239,13 @@ |
239 | 239 | { |
240 | 240 | if (!l_ptr) |
241 | 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 | 245 | int tipc_link_is_active(struct link *l_ptr) |
246 | 246 | { |
247 | - return ((l_ptr->owner->active_links[0] == l_ptr) || | |
248 | - (l_ptr->owner->active_links[1] == l_ptr)); | |
247 | + return (l_ptr->owner->active_links[0] == l_ptr) || | |
248 | + (l_ptr->owner->active_links[1] == l_ptr); | |
249 | 249 | } |
250 | 250 | |
251 | 251 | /** |
net/tipc/link.h
... | ... | @@ -279,12 +279,12 @@ |
279 | 279 | |
280 | 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 | 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 | 290 | static inline u32 lesser(u32 left, u32 right) |
291 | 291 | |
292 | 292 | |
293 | 293 | |
294 | 294 | |
295 | 295 | |
... | ... | @@ -299,32 +299,32 @@ |
299 | 299 | |
300 | 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 | 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 | 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 | 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 | 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 | 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 | 330 | #endif |
net/tipc/msg.h
... | ... | @@ -104,7 +104,7 @@ |
104 | 104 | |
105 | 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 | 110 | static inline void msg_set_user(struct tipc_msg *m, u32 n) |
... | ... | @@ -289,7 +289,7 @@ |
289 | 289 | |
290 | 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 | 295 | static inline u32 msg_routed(struct tipc_msg *m) |
... | ... | @@ -632,7 +632,7 @@ |
632 | 632 | |
633 | 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 | 638 | static inline void msg_set_max_pkt(struct tipc_msg *m, u32 n) |
net/tipc/name_table.c
net/tipc/node.c
... | ... | @@ -242,17 +242,17 @@ |
242 | 242 | |
243 | 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 | 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 | 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 | 258 | struct tipc_node *tipc_node_attach_link(struct link *l_ptr) |
net/tipc/port.h
net/tipc/socket.c
net/tipc/subscr.c