diff options
author | Joe Perches <joe@perches.com> | 2012-06-03 13:41:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-04 11:45:11 -0400 |
commit | e3192690a3c889767d1161b228374f4926d92af0 (patch) | |
tree | a2acbe06cc2efedb6002055f9d4ffd7f2ba6ec75 /net/irda/irqueue.c | |
parent | 29a6b6c060445eb46528785d51a2d8b0e6d898c4 (diff) |
net: Remove casts to same type
Adding casts of objects to the same type is unnecessary
and confusing for a human reader.
For example, this cast:
int y;
int *p = (int *)&y;
I used the coccinelle script below to find and remove these
unnecessary casts. I manually removed the conversions this
script produces of casts with __force and __user.
@@
type T;
T *p;
@@
- (T *)p
+ p
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda/irqueue.c')
-rw-r--r-- | net/irda/irqueue.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/irda/irqueue.c b/net/irda/irqueue.c index f06947c4fa82..7152624ed5f1 100644 --- a/net/irda/irqueue.c +++ b/net/irda/irqueue.c | |||
@@ -523,7 +523,7 @@ void *hashbin_remove_first( hashbin_t *hashbin) | |||
523 | * Dequeue the entry... | 523 | * Dequeue the entry... |
524 | */ | 524 | */ |
525 | dequeue_general( (irda_queue_t**) &hashbin->hb_queue[ bin ], | 525 | dequeue_general( (irda_queue_t**) &hashbin->hb_queue[ bin ], |
526 | (irda_queue_t*) entry ); | 526 | entry); |
527 | hashbin->hb_size--; | 527 | hashbin->hb_size--; |
528 | entry->q_next = NULL; | 528 | entry->q_next = NULL; |
529 | entry->q_prev = NULL; | 529 | entry->q_prev = NULL; |
@@ -615,7 +615,7 @@ void* hashbin_remove( hashbin_t* hashbin, long hashv, const char* name) | |||
615 | */ | 615 | */ |
616 | if ( found ) { | 616 | if ( found ) { |
617 | dequeue_general( (irda_queue_t**) &hashbin->hb_queue[ bin ], | 617 | dequeue_general( (irda_queue_t**) &hashbin->hb_queue[ bin ], |
618 | (irda_queue_t*) entry ); | 618 | entry); |
619 | hashbin->hb_size--; | 619 | hashbin->hb_size--; |
620 | 620 | ||
621 | /* | 621 | /* |
@@ -685,7 +685,7 @@ void* hashbin_remove_this( hashbin_t* hashbin, irda_queue_t* entry) | |||
685 | * Dequeue the entry... | 685 | * Dequeue the entry... |
686 | */ | 686 | */ |
687 | dequeue_general( (irda_queue_t**) &hashbin->hb_queue[ bin ], | 687 | dequeue_general( (irda_queue_t**) &hashbin->hb_queue[ bin ], |
688 | (irda_queue_t*) entry ); | 688 | entry); |
689 | hashbin->hb_size--; | 689 | hashbin->hb_size--; |
690 | entry->q_next = NULL; | 690 | entry->q_next = NULL; |
691 | entry->q_prev = NULL; | 691 | entry->q_prev = NULL; |