From: Dmitry Torokhov <dtor@insightbb.com>
To: Om Narasimhan <om.turyx@gmail.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@lists.osdl.org,
linux-atm-general@lists.sourceforge.net
Subject: Re: kmalloc to kzalloc patches for drivers/atm
Date: Sun, 17 Sep 2006 21:19:19 -0400 [thread overview]
Message-ID: <200609172119.20555.dtor@insightbb.com> (raw)
In-Reply-To: <6b4e42d10609171753i63697c8et3e6e1c5706b60d5f@mail.gmail.com>
On Sunday 17 September 2006 20:53, Om Narasimhan wrote:
> --- a/drivers/atm/firestream.c
> +++ b/drivers/atm/firestream.c
> @@ -1784,7 +1784,7 @@ static int __devinit fs_init (struct fs_
> write_fs (dev, RAM, (1 << (28 - FS155_VPI_BITS - FS155_VCI_BITS)) - 1);
> dev->nchannels = FS155_NR_CHANNELS;
> }
> - dev->atm_vccs = kmalloc (dev->nchannels * sizeof (struct atm_vcc *),
> + dev->atm_vccs = kzalloc (dev->nchannels * sizeof (struct atm_vcc *),
> GFP_KERNEL);
> fs_dprintk (FS_DEBUG_ALLOC, "Alloc atmvccs: %p(%Zd)\n",
> dev->atm_vccs, dev->nchannels * sizeof (struct atm_vcc *));
>
kcalloc would be better here because you are allocating several objects
at once.
--
Dmitry
next prev parent reply other threads:[~2006-09-18 1:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-18 0:53 kmalloc to kzalloc patches for drivers/atm Om Narasimhan
2006-09-18 1:19 ` Dmitry Torokhov [this message]
2006-09-18 9:42 ` Alan Cox
2006-09-18 12:07 ` Pekka Enberg
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=200609172119.20555.dtor@insightbb.com \
--to=dtor@insightbb.com \
--cc=kernel-janitors@lists.osdl.org \
--cc=linux-atm-general@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=om.turyx@gmail.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