[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140129114027.GX11841@sirena.org.uk>
Date: Wed, 29 Jan 2014 11:40:27 +0000
From: Mark Brown <broonie@...nel.org>
To: Manish Badarkhe <badarkhe.manish@...il.com>
Cc: Joe Perches <joe@...ches.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
gregkh@...uxfoundation.org, Liam Girdwood <lgirdwood@...il.com>
Subject: Re: [PATCH V3 1/2] devres: introduce API "devm_kstrdup"
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@...ches.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.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists