Re: [PATCH net-next 2/2] drivers/net: Remove casts of void *

From: Daniele Venzano
Date: Tue Jun 14 2011 - 04:23:57 EST


2011/6/14 Joe Perches <joe@xxxxxxxxxxx>:
> Unnecessary casts of void * clutter the code.

> diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c
> index 484f795..658a192 100644
> --- a/drivers/net/sis900.c
> +++ b/drivers/net/sis900.c
> @@ -482,7 +482,7 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
> Â Â Â Â Â Â Â Âret = -ENOMEM;
> Â Â Â Â Â Â Â Âgoto err_out_cleardev;
> Â Â Â Â}
> - Â Â Â sis_priv->tx_ring = (BufferDesc *)ring_space;
> + Â Â Â sis_priv->tx_ring = ring_space;
> Â Â Â Âsis_priv->tx_ring_dma = ring_dma;
>
> Â Â Â Âring_space = pci_alloc_consistent(pci_dev, RX_TOTAL_SIZE, &ring_dma);
> @@ -490,7 +490,7 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
> Â Â Â Â Â Â Â Âret = -ENOMEM;
> Â Â Â Â Â Â Â Âgoto err_unmap_tx;
> Â Â Â Â}
> - Â Â Â sis_priv->rx_ring = (BufferDesc *)ring_space;
> + Â Â Â sis_priv->rx_ring = ring_space;
> Â Â Â Âsis_priv->rx_ring_dma = ring_dma;
>
> Â Â Â Â/* The SiS900-specific entries in the device structure. */

sis900 looks good, too.

--
Daniele Venzano
venza@xxxxxxxxxxxx
http://www.brownhat.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/