From: David Miller <davem@davemloft.net>
To: joe@perches.com
Cc: anirban.chakraborty@qlogic.com, error27@gmail.com,
amit.salecha@qlogic.com, Linux-Driver@qlogic.com,
sucheta.chakraborty@qlogic.com, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch 2/2] qlcnic: using too much stack
Date: Tue, 10 Aug 2010 00:01:21 -0700 (PDT) [thread overview]
Message-ID: <20100810.000121.48516818.davem@davemloft.net> (raw)
In-Reply-To: <1281411546.1954.102.camel@Joe-Laptop.home>
From: Joe Perches <joe@perches.com>
Date: Mon, 09 Aug 2010 20:39:06 -0700
> On Mon, 2010-08-09 at 20:31 -0700, Anirban Chakraborty wrote:
>> On Aug 10, 2010, at 7:33 AM, Joe Perches wrote:
>> > On Mon, 2010-08-09 at 18:43 -0700, Anirban Chakraborty wrote:
>> >> Your patch is fine except that the preferred way is to use kzalloc over kaclloc. kzalloc does not need that extra
>> >> argument that you are passing to kcalloc.
>> > You probably meant to write "my preferred way"
>> > as the kcalloc to "kzalloc with a multiply"
>> > ratio is pretty high.
>> I was suggesting based on the following:
>> http://lwn.net/Articles/147014/
>
> Note that article suggests kzalloc for allocating
> a single zeroed object.
>
> kcalloc is used for multiple zeroed objects and
> protects against oversized allocations.
Agreed, kcalloc should be used here.
prev parent reply other threads:[~2010-08-10 7:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-09 10:37 [patch 2/2] qlcnic: using too much stack Dan Carpenter
2010-08-09 16:46 ` Anirban Chakraborty
2010-08-09 18:42 ` Dan Carpenter
2010-08-10 1:43 ` Anirban Chakraborty
2010-08-10 2:03 ` Joe Perches
2010-08-10 3:31 ` Anirban Chakraborty
2010-08-10 3:39 ` Joe Perches
2010-08-10 7:01 ` David Miller [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=20100810.000121.48516818.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Linux-Driver@qlogic.com \
--cc=amit.salecha@qlogic.com \
--cc=anirban.chakraborty@qlogic.com \
--cc=error27@gmail.com \
--cc=joe@perches.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sucheta.chakraborty@qlogic.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;
as well as URLs for NNTP newsgroup(s).