From: Boaz Harrosh <bharrosh@panasas.com>
To: Rolf Eike Beer <eike-kernel@sf-tec.de>
Cc: "Moger, Babu" <Babu.Moger@lsi.com>,
Hillf Danton <dhillf@gmail.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
Chandra Seetharaman <chandra.seetharaman@us.ibm.com>
Subject: Re: [PATCH] fix kzalloc in scsi device handler
Date: Wed, 17 Nov 2010 12:04:04 +0200 [thread overview]
Message-ID: <4CE3A894.5050303@panasas.com> (raw)
In-Reply-To: <201011161835.49079.eike-kernel@sf-tec.de>
On 11/16/2010 07:35 PM, Rolf Eike Beer wrote:
>
> How about:
> scsi_dh_data = kzalloc(sizeof(*scsi_dh_data) + sizeof(*h), GFP_KERNEL)?
>
> Eike
I always prefer this form because this way I have all the information in
that single statement. I'm allocating space for scsi_dh_data for what ever
that would be. The other form I have to go looking up to see what is
scsi_dh_data's type and there is place for error.
Naturally for above it would follow:
h = typeof(h)(scsi_dh_data + 1);
My $0.017
Boaz
next prev parent reply other threads:[~2010-11-17 10:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-16 13:34 [PATCH] fix kzalloc in scsi device handler Hillf Danton
2010-11-16 16:15 ` Moger, Babu
2010-11-16 17:35 ` Rolf Eike Beer
2010-11-16 18:57 ` Moger, Babu
2010-11-16 19:17 ` Rolf Eike Beer
2010-11-16 19:23 ` Moger, Babu
2010-11-17 10:04 ` Boaz Harrosh [this message]
2010-11-17 13:16 ` Hillf Danton
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=4CE3A894.5050303@panasas.com \
--to=bharrosh@panasas.com \
--cc=Babu.Moger@lsi.com \
--cc=chandra.seetharaman@us.ibm.com \
--cc=dhillf@gmail.com \
--cc=eike-kernel@sf-tec.de \
--cc=linux-scsi@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.