Skip to content

Commit

Permalink
alx: Remove casts of pointer to same type
Browse files Browse the repository at this point in the history
Casting a pointer to a pointer of the same type is pointless,
so remove these unnecessary casts.

Done via coccinelle script:

$ cat typecast_2.cocci
@@
type T;
T *foo;
@@

-	(T *)foo
+	foo

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Joe Perches authored and David S. Miller committed Mar 26, 2014
1 parent 41ced61 commit 60f4010
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/atheros/alx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ static int alx_alloc_descriptors(struct alx_priv *alx)
if (!alx->descmem.virt)
goto out_free;

alx->txq.tpd = (void *)alx->descmem.virt;
alx->txq.tpd = alx->descmem.virt;
alx->txq.tpd_dma = alx->descmem.dma;

/* alignment requirement for next block */
Expand Down

0 comments on commit 60f4010

Please sign in to comment.