tg3: replace kmalloc+memset with kzalloc
PATCH 1/1 tg3: replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc
Signed-off-by Yan Burman <[email protected]>
drivers/net/tg3.c +1 -8
@@ -4416,7 +4416,7 @@ static void tg3_free_consistent(struct t*/ static int tg3_alloc_consistent (struct tg3 *tp) { - tp->rx_std_buffers = kmalloc((sizeof(struct ring_info) * + tp->rx_std_buffers = kzalloc((sizeof(struct ring_info) * (TG3_RX_RING_SIZE + TG3_RX_JUMBO_RING_SIZE)) + (sizeof(struct tx_ring_info) *
@@ -4425,13 +4425,6 @@ static int tg3_alloc_consistent(struct tif (!tp->rx_std_buffers)return -ENOMEM ; -memset (tp->rx_std_buffers,0 , - (sizeof (struct ring_info ) * - (TG3_RX_RING_SIZE + -TG3_RX_JUMBO_RING_SIZE )) + - (sizeof (struct tx_ring_info ) * -TG3_TX_RING_SIZE )); - tp->rx_jumbo_buffers = &tp->rx_std_buffers[TG3_RX_RING_SIZE ]; tp->tx_buffers = (struct tx_ring_info *) &tp->rx_jumbo_buffers[TG3_RX_JUMBO_RING_SIZE ];
Quoted 3 lines · Yan Burman
Replace kmalloc+memset with kzalloc
Signed-off-by Yan Burman <[email protected]>
Acked-by Michael Chan <[email protected]>
From: "Michael Chan" <[email protected]>
Date: Tue, 12 Dec 2006 12:30:28 -0800
Quoted 6 lines · Yan Burman
Quoted 3 lines
Replace kmalloc+memset with kzalloc
Signed-off-by Yan Burman <[email protected]>Acked-by Michael Chan <[email protected]>
Applied, thanks everyone.