Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bd2b334378530f6dbe03f6325b8c885524e298a3 Commit: bd2b334378530f6dbe03f6325b8c885524e298a3 Parent: e25db641c0e6dd49c5db24dbe154048d4a466727 Author: Yan Burman <[EMAIL PROTECTED]> AuthorDate: Thu Dec 14 15:25:00 2006 -0800 Committer: David S. Miller <[EMAIL PROTECTED]> CommitDate: Sun Dec 17 21:59:06 2006 -0800
[TG3]: replace kmalloc+memset with kzalloc Replace kmalloc+memset with kzalloc Signed-off-by: Yan Burman <[EMAIL PROTECTED]> Acked-by: Michael Chan <[EMAIL PROTECTED]> Signed-off-by: David S. Miller <[EMAIL PROTECTED]> --- drivers/net/tg3.c | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 571320a..23bad21 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -4426,7 +4426,7 @@ static void tg3_free_consistent(struct tg3 *tp) */ 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) * @@ -4435,13 +4435,6 @@ static int tg3_alloc_consistent(struct tg3 *tp) if (!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]; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html