diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2009-04-14 21:32:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-16 05:34:49 -0400 |
commit | 8d4dd5cff892e18a34422852c05a88b79ff978ed (patch) | |
tree | f28822408c874736c99687d02480893278c4a577 /drivers/net/fec.c | |
parent | 2e28532f7e63c3011f7b3c1516cfebd5321bdd15 (diff) |
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/fec.c')
-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 f8396fb30326..e03b1773966d 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) | |||
1660 | struct bufdesc *bdp, *cbd_base; | 1660 | struct bufdesc *bdp, *cbd_base; |
1661 | int i, j; | 1661 | int i, j; |
1662 | 1662 | ||
1663 | /* Allocate memory for buffer descriptors. | 1663 | /* Allocate memory for buffer descriptors. */ |
1664 | */ | 1664 | cbd_base = dma_alloc_coherent(NULL, PAGE_SIZE, &fep->bd_dma, |
1665 | mem_addr = (unsigned long)dma_alloc_coherent(NULL, PAGE_SIZE, | 1665 | GFP_KERNEL); |
1666 | &fep->bd_dma, GFP_KERNEL); | 1666 | if (!cbd_base) { |
1667 | if (mem_addr == 0) { | ||
1668 | printk("FEC: allocate descriptor memory failed?\n"); | 1667 | printk("FEC: allocate descriptor memory failed?\n"); |
1669 | return -ENOMEM; | 1668 | return -ENOMEM; |
1670 | } | 1669 | } |
@@ -1698,10 +1697,7 @@ int __init fec_enet_init(struct net_device *dev, int index) | |||
1698 | } | 1697 | } |
1699 | #endif | 1698 | #endif |
1700 | 1699 | ||
1701 | cbd_base = (struct bufdesc *)mem_addr; | 1700 | /* Set receive and transmit descriptor base. */ |
1702 | |||
1703 | /* Set receive and transmit descriptor base. | ||
1704 | */ | ||
1705 | fep->rx_bd_base = cbd_base; | 1701 | fep->rx_bd_base = cbd_base; |
1706 | fep->tx_bd_base = cbd_base + RX_RING_SIZE; | 1702 | fep->tx_bd_base = cbd_base + RX_RING_SIZE; |
1707 | 1703 | ||