public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [KJ][PATCH]mmtimer.c-kzalloc
@ 2007-04-16  5:56 vignesh.babu
  2007-04-18  0:07 ` [KJ][PATCH]mmtimer.c-kzalloc Christoph Lameter
  0 siblings, 1 reply; 2+ messages in thread
From: vignesh.babu @ 2007-04-16  5:56 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1039 bytes --]


Replacing kmalloc/memset combination with kzalloc.

Signed-off-by: vignesh babu <vignesh.babu@wipro.com>
---
diff --git a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c
index c091603..6e55cfb 100644
--- a/drivers/char/mmtimer.c
+++ b/drivers/char/mmtimer.c
@@ -705,15 +705,13 @@ static int __init mmtimer_init(void)
 	maxn++;
 
 	/* Allocate list of node ptrs to mmtimer_t's */
-	timers = kmalloc(sizeof(mmtimer_t *)*maxn, GFP_KERNEL);
+	timers = kzalloc(sizeof(mmtimer_t *)*maxn, GFP_KERNEL);
 	if (timers == NULL) {
 		printk(KERN_ERR "%s: failed to allocate memory for device\n",
 				MMTIMER_NAME);
 		goto out3;
 	}
 
-	memset(timers,0,(sizeof(mmtimer_t *)*maxn));
-
 	/* Allocate mmtimer_t's for each online node */
 	for_each_online_node(node) {
 		timers[node] = kmalloc_node(sizeof(mmtimer_t)*NUM_COMPARATORS, GFP_KERNEL, node);

-- 
Regards,  
Vignesh Babu BM  
_____________________________________________________________  
"Why is it that every time I'm with you, makes me believe in magic?"

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3173 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [KJ][PATCH]mmtimer.c-kzalloc
  2007-04-16  5:56 [KJ][PATCH]mmtimer.c-kzalloc vignesh.babu
@ 2007-04-18  0:07 ` Christoph Lameter
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Lameter @ 2007-04-18  0:07 UTC (permalink / raw)
  To: kernel-janitors

On Mon, 16 Apr 2007, vignesh.babu@wipro.com wrote:

> Replacing kmalloc/memset combination with kzalloc.

Acked-by: Christoph Lameter <clameter@sgi.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-04-18  0:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-16  5:56 [KJ][PATCH]mmtimer.c-kzalloc vignesh.babu
2007-04-18  0:07 ` [KJ][PATCH]mmtimer.c-kzalloc Christoph Lameter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox