diff mbox

[OPW,kernel,02/16] staging: dgap: Remove useless cast on void pointer

Message ID 20141030113152.GC15682@kt-Inspiron-3542
State New, archived
Headers show

Commit Message

Tapasweni Pathak Oct. 30, 2014, 11:31 a.m. UTC
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>
---
 drivers/staging/dgap/dgap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
1.7.9.5
diff mbox

Patch

diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index d6c7344..ee5a7f2 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/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;