net: ethernet: ixp4xx_eth: Use dma_pool_zalloc
Subsystems (3)
PATCH 1/1 net: ethernet: ixp4xx_eth: Use dma_pool_zalloc
Replacing dma_pool_alloc and memset with a single call to dma_pool_zalloc
Signed-off-by Vasyl Gomonovych <[email protected]>
--- drivers/net/ethernet/xscale/ixp4xx_eth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/xscale/ixp4xx_eth.c +3 -3
@@ -1108,10 +1108,10 @@ static int init_queues(struct port *port)return -ENOMEM ; } -if (!(port->desc_tab =dma_pool_alloc (dma_pool,GFP_KERNEL , - &port->desc_tab_phys))) + port->desc_tab =dma_pool_zalloc (dma_pool,GFP_KERNEL , + &port->desc_tab_phys); +if (!port->desc_tab)return -ENOMEM ; -memset (port->desc_tab,0 ,POOL_ALLOC_SIZE );memset (port->rx_buff_tab,0 ,sizeof (port->rx_buff_tab));/* tables */ memset (port->tx_buff_tab,0 ,sizeof (port->tx_buff_tab));
Signature · 1 line
1.9.1
Sorry, Ignore this please.
Quoted 28 lines · Vasyl Gomonovych
Replacing
dma_pool_allocand memset with a single call todma_pool_zallocSigned-off-by Vasyl Gomonovych <[email protected]>--- drivers/net/ethernet/xscale/ixp4xx_eth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/net/ethernet/xscale/ixp4xx_eth.c +3
-4@@ -1108,10 +1108,10 @@ static int init_queues(struct port *port)return -ENOMEM ; } -if (!(port->desc_tab =dma_pool_alloc (dma_pool,GFP_KERNEL , - &port->desc_tab_phys))) + port->desc_tab =dma_pool_zalloc (dma_pool,GFP_KERNEL , + &port->desc_tab_phys); +if (!port->desc_tab)return -ENOMEM ; -memset (port->desc_tab,0 ,POOL_ALLOC_SIZE );memset (port->rx_buff_tab,0 ,sizeof (port->rx_buff_tab));/* tables */ memset (port->tx_buff_tab,0 ,sizeof (port->tx_buff_tab)); --1.9.1
Signature · 1 line
Доброї вам пори дня.