浏览代码

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 <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches 11 年之前
父节点
当前提交
60f40107ab
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/ethernet/atheros/alx/main.c

+ 1 - 1
drivers/net/ethernet/atheros/alx/main.c

@@ -535,7 +535,7 @@ static int alx_alloc_descriptors(struct alx_priv *alx)
 	if (!alx->descmem.virt)
 	if (!alx->descmem.virt)
 		goto out_free;
 		goto out_free;
 
 
-	alx->txq.tpd = (void *)alx->descmem.virt;
+	alx->txq.tpd = alx->descmem.virt;
 	alx->txq.tpd_dma = alx->descmem.dma;
 	alx->txq.tpd_dma = alx->descmem.dma;
 
 
 	/* alignment requirement for next block */
 	/* alignment requirement for next block */