From: Surya Prabhakar N <surya.prabhakar@wipro.com>
To: dwmw2@infradead.org, linux-mtd@lists.infradead.org
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
kernel-janitors <kernel-janitors@lists.osdl.org>
Subject: [KJ] replacing kmalloc with kzalloc in drivers/mtd/devices/docprobe.c
Date: Mon, 13 Aug 2007 15:26:32 +0530 [thread overview]
Message-ID: <1186998992.29518.15.camel@bluegenie> (raw)
Hi,
Replacing kmalloc with kzalloc and cleaning up memset in
drivers/mtd/devices/docprobe.c.
Signed-off-by: Surya Prabhakar <surya.prabhakar@wipro.com>
---
diff --git a/drivers/mtd/devices/docprobe.c b/drivers/mtd/devices/docprobe.c
index 54aa759..53be397 100644
--- a/drivers/mtd/devices/docprobe.c
+++ b/drivers/mtd/devices/docprobe.c
@@ -254,7 +254,7 @@ static void __init DoC_Probe(unsigned long physadr)
return;
}
docfound = 1;
- mtd = kmalloc(sizeof(struct DiskOnChip) + sizeof(struct mtd_info), GFP_KERNEL);
+ mtd = kzalloc(sizeof(struct DiskOnChip) + sizeof(struct mtd_info), GFP_KERNEL);
if (!mtd) {
printk(KERN_WARNING "Cannot allocate memory for data structures. Dropping.\n");
@@ -264,9 +264,6 @@ static void __init DoC_Probe(unsigned long physadr)
this = (struct DiskOnChip *)(&mtd[1]);
- memset((char *)mtd,0, sizeof(struct mtd_info));
- memset((char *)this, 0, sizeof(struct DiskOnChip));
-
mtd->priv = this;
this->virtadr = docptr;
this->physadr = physadr;
--
thanks
surya.
reply other threads:[~2007-08-13 13:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1186998992.29518.15.camel@bluegenie \
--to=surya.prabhakar@wipro.com \
--cc=dwmw2@infradead.org \
--cc=kernel-janitors@lists.osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
/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®