fec: remove unnecessary cast
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
2e28532f7e
commit
8d4dd5cff8
@@ -1660,11 +1660,10 @@ int __init fec_enet_init(struct net_device *dev, int index)
|
|||||||
struct bufdesc *bdp, *cbd_base;
|
struct bufdesc *bdp, *cbd_base;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
/* Allocate memory for buffer descriptors.
|
/* Allocate memory for buffer descriptors. */
|
||||||
*/
|
cbd_base = dma_alloc_coherent(NULL, PAGE_SIZE, &fep->bd_dma,
|
||||||
mem_addr = (unsigned long)dma_alloc_coherent(NULL, PAGE_SIZE,
|
GFP_KERNEL);
|
||||||
&fep->bd_dma, GFP_KERNEL);
|
if (!cbd_base) {
|
||||||
if (mem_addr == 0) {
|
|
||||||
printk("FEC: allocate descriptor memory failed?\n");
|
printk("FEC: allocate descriptor memory failed?\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
@@ -1698,10 +1697,7 @@ int __init fec_enet_init(struct net_device *dev, int index)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cbd_base = (struct bufdesc *)mem_addr;
|
/* Set receive and transmit descriptor base. */
|
||||||
|
|
||||||
/* Set receive and transmit descriptor base.
|
|
||||||
*/
|
|
||||||
fep->rx_bd_base = cbd_base;
|
fep->rx_bd_base = cbd_base;
|
||||||
fep->tx_bd_base = cbd_base + RX_RING_SIZE;
|
fep->tx_bd_base = cbd_base + RX_RING_SIZE;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user