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 /net/irda | |
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>
Diffstat (limited to 'net/irda')
-rw-r--r-- | net/irda/af_irda.c | 14 | ||||
-rw-r--r-- | net/irda/discovery.c | 2 | ||||
-rw-r--r-- | net/irda/ircomm/ircomm_tty.c | 4 | ||||
-rw-r--r-- | net/irda/irlmp.c | 2 | ||||
-rw-r--r-- | net/irda/irlmp_frame.c | 2 | ||||
-rw-r--r-- | net/irda/irnet/irnet_irda.c | 22 | ||||
-rw-r--r-- | net/irda/irnet/irnet_ppp.c | 8 |
7 files changed, 27 insertions, 27 deletions
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 | /*------------------------------------------------------------------*/ |