mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Manish Badarkhe <badarkhe.manish@gmail.com>
Cc: Joe Perches <joe@perches.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	gregkh@linuxfoundation.org, Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH V3 1/2] devres: introduce API "devm_kstrdup"
Date: Wed, 29 Jan 2014 11:40:27 +0000	[thread overview]
Message-ID: <20140129114027.GX11841@sirena.org.uk> (raw)
In-Reply-To: <CAKDJKT7ZpH89k6a4yfbBt+dpQ3oM9Khe42VwFmEjKqmu55jNzw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 499 bytes --]

On Wed, Jan 29, 2014 at 04:38:20PM +0530, Manish Badarkhe wrote:
> On Wed, Jan 29, 2014 at 9:48 AM, Joe Perches <joe@perches.com> wrote:

> >> +     buf = devm_kzalloc(dev, size, gfp);

> > If this is really necessary, please use devm_kmalloc

> devm_kzalloc is always better giving zeroed memory locations.
> Is there any reason not to go for it?

If the allocated memory is going to be immediately overwritten with the
string then it shouldn't make any difference if it was zeroed when
allocated.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2014-01-29 11:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29  4:02 [PATCH V3 0/2] devm_* API operation for fixed regulator Manish Badarkhe
2014-01-29  4:03 ` [PATCH V3 1/2] devres: introduce API "devm_kstrdup" Manish Badarkhe
2014-01-29  4:18   ` Joe Perches
2014-01-29 11:08     ` Manish Badarkhe
2014-01-29 11:40       ` Mark Brown [this message]
2014-01-29 11:55         ` Manish Badarkhe
2014-01-29  4:03 ` [PATCH V3 2/2] regulator: fixed: update to devm_* API Manish Badarkhe

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=20140129114027.GX11841@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=badarkhe.manish@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=lgirdwood@gmail.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 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®