* [PATCH 2.6.19] tg3: replace kmalloc+memset with kzalloc
@ 2006-12-12 19:10 Yan Burman
2006-12-12 20:30 ` Michael Chan
0 siblings, 1 reply; 3+ messages in thread
From: Yan Burman @ 2006-12-12 19:10 UTC (permalink / raw)
To: linux-kernel; +Cc: trivial, mchan
Replace kmalloc+memset with kzalloc
Signed-off-by: Yan Burman <burman.yan@gmail.com>
diff -rubp linux-2.6.19-rc5_orig/drivers/net/tg3.c linux-2.6.19-rc5_kzalloc/drivers/net/tg3.c
--- linux-2.6.19-rc5_orig/drivers/net/tg3.c 2006-11-09 12:16:21.000000000 +0200
+++ linux-2.6.19-rc5_kzalloc/drivers/net/tg3.c 2006-11-11 22:44:18.000000000 +0200
@@ -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 t
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];
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 2.6.19] tg3: replace kmalloc+memset with kzalloc
2006-12-12 19:10 [PATCH 2.6.19] tg3: replace kmalloc+memset with kzalloc Yan Burman
@ 2006-12-12 20:30 ` Michael Chan
2006-12-14 23:25 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Michael Chan @ 2006-12-12 20:30 UTC (permalink / raw)
To: Yan Burman; +Cc: linux-kernel, trivial
On Tue, 2006-12-12 at 21:10 +0200, Yan Burman wrote:
> Replace kmalloc+memset with kzalloc
>
> Signed-off-by: Yan Burman <burman.yan@gmail.com>
Acked-by: Michael Chan <mchan@broadcom.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2.6.19] tg3: replace kmalloc+memset with kzalloc
2006-12-12 20:30 ` Michael Chan
@ 2006-12-14 23:25 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2006-12-14 23:25 UTC (permalink / raw)
To: mchan; +Cc: burman.yan, linux-kernel, trivial
From: "Michael Chan" <mchan@broadcom.com>
Date: Tue, 12 Dec 2006 12:30:28 -0800
> On Tue, 2006-12-12 at 21:10 +0200, Yan Burman wrote:
> > Replace kmalloc+memset with kzalloc
> >
> > Signed-off-by: Yan Burman <burman.yan@gmail.com>
>
> Acked-by: Michael Chan <mchan@broadcom.com>
Applied, thanks everyone.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-12-14 23:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-12 19:10 [PATCH 2.6.19] tg3: replace kmalloc+memset with kzalloc Yan Burman
2006-12-12 20:30 ` Michael Chan
2006-12-14 23:25 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox