mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@mindspring.com>
To: Roland Dreier <rdreier@cisco.com>
Cc: Mariusz Kozlowski <m.kozlowski@tuxland.pl>,
	surya.prabhakar@wipro.com, mingo@redhat.com,
	yaku@css1.kbnes.nec.co.jp, kisimoto@css1.kbnes.nec.co.jp,
	zab@redhat.com, Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [KJ] replacing kmalloc with kzalloc in io_apic.c
Date: Mon, 13 Aug 2007 13:26:51 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0708131326330.8900@localhost.localdomain> (raw)
In-Reply-To: <aday7gf8hw4.fsf@cisco.com>

On Mon, 13 Aug 2007, Roland Dreier wrote:

>  > from my days submitting numerous patches of this type, i can recall
>  > that in cases like the above, it's a judgment call -- use kzalloc to
>  > get the zeroing, or use kcalloc to get the array-flavoured behaviour.
>  > what a shame you can't have both at the same time.
>
> kcalloc() zeros memory just like standard calloc() in userspace.
>
> As <linux/slab.h> says:
>
>  * kcalloc - allocate memory for an array. The memory is set to zero.

oops.  quite right, my bad.

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================

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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-13  8:31 Surya Prabhakar N
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 [this message]

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=Pine.LNX.4.64.0708131326330.8900@localhost.localdomain \
    --to=rpjday@mindspring.com \
    --cc=kisimoto@css1.kbnes.nec.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.kozlowski@tuxland.pl \
    --cc=mingo@redhat.com \
    --cc=rdreier@cisco.com \
    --cc=surya.prabhakar@wipro.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®