linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <oss@buserror.net>
To: Nicholas Mc Guire <hofrat@osadl.org>, Li Yang <leoyang.li@nxp.com>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] soc: fsl: guts: us devm_kstrdup_const() for RO data
Date: Fri, 21 Dec 2018 20:29:56 -0600	[thread overview]
Message-ID: <98aba52405a63829ee79c775c8b749f8431f5d2a.camel@buserror.net> (raw)
In-Reply-To: <1544170963-8386-1-git-send-email-hofrat@osadl.org>

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 reference?  That would require that
is_kernel_rodata(machine) be true, which it shouldn't be since it's not part
of the kernel image.

-Scott



  reply	other threads:[~2018-12-22  2:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-07  8:22 [PATCH] soc: fsl: guts: us devm_kstrdup_const() for RO data Nicholas Mc Guire
2018-12-22  2:29 ` Scott Wood [this message]
2018-12-22  7:59   ` Nicholas Mc Guire
2019-01-10 19:43     ` Li Yang
2019-01-11  2:43       ` Nicholas Mc Guire
2019-01-11 21:32         ` Leo Li

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=98aba52405a63829ee79c775c8b749f8431f5d2a.camel@buserror.net \
    --to=oss@buserror.net \
    --cc=hofrat@osadl.org \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).