diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2009-04-15 01:32:17 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-16 09:34:49 (GMT) |
commit | 8d4dd5cff892e18a34422852c05a88b79ff978ed (patch) | |
tree | f28822408c874736c99687d02480893278c4a577 /drivers/net | |
parent | 2e28532f7e63c3011f7b3c1516cfebd5321bdd15 (diff) | |
download | linux-8d4dd5cff892e18a34422852c05a88b79ff978ed.tar.xz |
fec: remove unnecessary cast
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/fec.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index f8396fb..e03b177 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c @@ -1660,11 +1660,10 @@ int __init fec_enet_init(struct net_device *dev, int index) struct bufdesc *bdp, *cbd_base; int i, j; - /* Allocate memory for buffer descriptors. - */ - mem_addr = (unsigned long)dma_alloc_coherent(NULL, PAGE_SIZE, - &fep->bd_dma, GFP_KERNEL); - if (mem_addr == 0) { + /* Allocate memory for buffer descriptors. */ + cbd_base = dma_alloc_coherent(NULL, PAGE_SIZE, &fep->bd_dma, + GFP_KERNEL); + if (!cbd_base) { printk("FEC: allocate descriptor memory failed?\n"); return -ENOMEM; } @@ -1698,10 +1697,7 @@ int __init fec_enet_init(struct net_device *dev, int index) } #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->tx_bd_base = cbd_base + RX_RING_SIZE; |