RE: [PATCH] soc: fsl: guts: us devm_kstrdup_const() for RO data

2019-01-11 Thread Leo Li
olas Mc Guire > Subject: Re: [PATCH] soc: fsl: guts: us devm_kstrdup_const() for RO data > > On Thu, Jan 10, 2019 at 01:43:01PM -0600, Li Yang wrote: > > On Sat, Dec 22, 2018 at 2:02 AM Nicholas Mc Guire > wrote: > > > > > > On Fri, Dec 21, 2018 at 08:29:56PM

Re: [PATCH] soc: fsl: guts: us devm_kstrdup_const() for RO data

2019-01-10 Thread Nicholas Mc Guire
On Thu, Jan 10, 2019 at 01:43:01PM -0600, Li Yang wrote: > On Sat, Dec 22, 2018 at 2:02 AM Nicholas Mc Guire wrote: > > > > On Fri, Dec 21, 2018 at 08:29:56PM -0600, Scott Wood wrote: > > > On Fri, 2018-12-07 at 09:22 +0100, Nicholas Mc Guire wrote: > > > > devm_kstrdup() may return NULL if intern

Re: [PATCH] soc: fsl: guts: us devm_kstrdup_const() for RO data

2019-01-10 Thread Li Yang
On Sat, Dec 22, 2018 at 2:02 AM Nicholas Mc Guire wrote: > > On Fri, Dec 21, 2018 at 08:29:56PM -0600, Scott Wood wrote: > > On Fri, 2018-12-07 at 09:22 +0100, Nicholas Mc Guire wrote: > > > devm_kstrdup() may return NULL if internal allocation failed, but > > > as machine is from the device tre

Re: [PATCH] soc: fsl: guts: us devm_kstrdup_const() for RO data

2018-12-22 Thread Nicholas Mc Guire
On Fri, Dec 21, 2018 at 08:29:56PM -0600, Scott Wood wrote: > On Fri, 2018-12-07 at 09:22 +0100, Nicholas Mc Guire wrote: > > devm_kstrdup() may return NULL if internal allocation failed, but > > as machine is from the device tree, and thus RO, devm_kstrdup_const() > > can be used here, which wil

Re: [PATCH] soc: fsl: guts: us devm_kstrdup_const() for RO data

2018-12-21 Thread Scott Wood
On Fri, 2018-12-07 at 09:22 +0100, Nicholas Mc Guire wrote: > devm_kstrdup() may return NULL if internal allocation failed, but > as machine is from the device tree, and thus RO, devm_kstrdup_const() > can be used here, which will only copy the reference. Is it really going to only copy the refe

[PATCH] soc: fsl: guts: us devm_kstrdup_const() for RO data

2018-12-07 Thread Nicholas Mc Guire
devm_kstrdup() may return NULL if internal allocation failed, but as machine is from the device tree, and thus RO, devm_kstrdup_const() can be used here, which will only copy the reference. Signed-off-by: Nicholas Mc Guire Fixes: a6fc3b698130 ("soc: fsl: add GUTS driver for QorIQ platforms") --