From: Joe Perches Date: Mon, 24 Mar 2014 20:15:35 +0000 (-0700) Subject: alx: Remove casts of pointer to same type X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=60f40107ab7d722810fd8aa3f52590752a0a3acf;p=openwrt%2Fstaging%2Fblogic.git alx: Remove casts of pointer to same type 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c index 96f3edb6c738..17bb9ce96260 100644 --- a/drivers/net/ethernet/atheros/alx/main.c +++ b/drivers/net/ethernet/atheros/alx/main.c @@ -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 */