From: Harry Wei <jiaweiwei.xiyou@gmail.com>
To: anish <anish198519851985@gmail.com>
Cc: greg@kroah.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] preferred form for passing a size to memory allocation routines
Date: Sun, 15 May 2011 17:37:09 +0800 [thread overview]
Message-ID: <20110515093655.GA2768@gmail.com> (raw)
In-Reply-To: <1305395704.7400.17.camel@anish-desktop>
On Sat, May 14, 2011 at 11:25:04PM +0530, anish wrote:
> The preferred form for passing a size of a struct is the following:
> p = kmalloc(sizeof(*p), ...);
> Please refer Documentation/Codingstyle chapter 14
> Signed-off-by: anish kumar<anish198519851985@gmail.com>
> - sfb = kzalloc(sizeof(struct smtcfb_info), GFP_KERNEL);
> + sfb = kzalloc(sizeof(*sfb), GFP_KERNEL);
Hi anish,
Good catch ;)
Acked-by: Harry Wei <harryxiyou@gmail.com>
next prev parent reply other threads:[~2011-05-15 9:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-14 17:55 [PATCH 2/3] preferred form for passing a size to memory allocation routines anish
2011-05-15 9:37 ` Harry Wei [this message]
2011-05-16 15:49 ` [PATCH 2/3] preferred form for passing a size to memory allocation routines[staging sm7xx] anish
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=20110515093655.GA2768@gmail.com \
--to=jiaweiwei.xiyou@gmail.com \
--cc=anish198519851985@gmail.com \
--cc=greg@kroah.com \
--cc=linux-kernel@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.