staging: dgnc: Remove useless cast on void pointer
authorTapasweni Pathak <tapaswenipathak@gmail.com>
Thu, 30 Oct 2014 11:32:04 +0000 (17:02 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Oct 2014 20:05:46 +0000 (13:05 -0700)
void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Build tested it.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgnc/dgnc_cls.c
drivers/staging/dgnc/dgnc_neo.c

index 360fe258946dd568062f64ef5cddf2f9b8d71813..bedc5221b6fc6e73279f15171dec8d63de53bbf4 100644 (file)
@@ -792,7 +792,7 @@ static void cls_tasklet(unsigned long data)
  */
 static irqreturn_t cls_intr(int irq, void *voidbrd)
 {
-       struct dgnc_board *brd = (struct dgnc_board *) voidbrd;
+       struct dgnc_board *brd = voidbrd;
        uint i = 0;
        unsigned char poll_reg;
        unsigned long flags;
index cc613641807194c3d40236d81db65ee8acd9b1e9..c9a8a9825cfb25fa4d3392e7c23eea8bfecbf7c6 100644 (file)
@@ -944,7 +944,7 @@ static void neo_tasklet(unsigned long data)
  */
 static irqreturn_t neo_intr(int irq, void *voidbrd)
 {
-       struct dgnc_board *brd = (struct dgnc_board *) voidbrd;
+       struct dgnc_board *brd = voidbrd;
        struct channel_t *ch;
        int port = 0;
        int type = 0;