Răsfoiți Sursa

staging: dgap: Remove useless cast on void pointer

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>
Tapasweni Pathak 11 ani în urmă
părinte
comite
d591f5d0e5
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      drivers/staging/dgap/dgap.c

+ 1 - 1
drivers/staging/dgap/dgap.c

@@ -1167,7 +1167,7 @@ schedule_poller:
  */
 static irqreturn_t dgap_intr(int irq, void *voidbrd)
 {
-	struct board_t *brd = (struct board_t *) voidbrd;
+	struct board_t *brd = voidbrd;
 
 	if (!brd)
 		return IRQ_NONE;