mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Surya Prabhakar N <surya.prabhakar@wipro.com>
To: mingo@redhat.com
Cc: yaku@css1.kbnes.nec.co.jp, kisimoto@css1.kbnes.nec.co.jp,
	zab@redhat.com, Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [KJ] replacing kmalloc with kzalloc in io_apic.c
Date: Mon, 13 Aug 2007 14:01:21 +0530	[thread overview]
Message-ID: <1186993881.3175.15.camel@bluegenie> (raw)

Hi,
   Replacing kmalloc with kzalloc and cleaning up memset in 
arch/i386/kernel/io_apic.c


Signed-off-by: Surya Prabhakar <surya.prabhakar@wipro.com>
--- 

diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index 4b8a8da..1329615 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -690,14 +690,12 @@ static int __init balanced_irq_init(void)
 		physical_balance = 1;
 
 	for_each_online_cpu(i) {
-		irq_cpu_data[i].irq_delta = kmalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL);
-		irq_cpu_data[i].last_irq = kmalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL);
+		irq_cpu_data[i].irq_delta = kzalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL);
+		irq_cpu_data[i].last_irq = kzalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL);
 		if (irq_cpu_data[i].irq_delta == NULL || irq_cpu_data[i].last_irq == NULL) {
 			printk(KERN_ERR "balanced_irq_init: out of memory");
 			goto failed;
 		}
-		memset(irq_cpu_data[i].irq_delta,0,sizeof(unsigned long) * NR_IRQS);
-		memset(irq_cpu_data[i].last_irq,0,sizeof(unsigned long) * NR_IRQS);
 	}
 	
 	printk(KERN_INFO "Starting balanced_irq\n");



thanks
surya.

             reply	other threads:[~2007-08-13 13:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-13  8:31 Surya Prabhakar N [this message]
2007-08-13 13:18 ` Mariusz Kozlowski
2007-08-13 15:54   ` Robert P. J. Day
2007-08-13 17:27     ` Roland Dreier
2007-08-13 17:26       ` Robert P. J. Day

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1186993881.3175.15.camel@bluegenie \
    --to=surya.prabhakar@wipro.com \
    --cc=kisimoto@css1.kbnes.nec.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=yaku@css1.kbnes.nec.co.jp \
    --cc=zab@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®