From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Greg KH <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Jassi Brar <jassisinghbrar@gmail.com>,
Thierry Reding <thierry.reding@gmail.com>,
Jon Hunter <jonathanh@nvidia.com>, Arnd Bergmann <arnd@arndb.de>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-tegra@vger.kernel.org,
Linux-Arch <linux-arch@vger.kernel.org>,
Linux MM <linux-mm@kvack.org>
Subject: Re: [PATCH v5 3/4] devres: provide devm_kstrdup_const()
Date: Fri, 28 Sep 2018 09:30:45 +0200 [thread overview]
Message-ID: <CAMuHMdVF9zD+KZ8E1-BCrn4W2QngABHqnCajOhk3Y=xpq4R=Cg@mail.gmail.com> (raw)
In-Reply-To: <20180928071414.30703-4-brgl@bgdev.pl>
On Fri, Sep 28, 2018 at 9:14 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> Provide a resource managed version of kstrdup_const(). This variant
> internally calls devm_kstrdup() on pointers that are outside of
> .rodata section and returns the string as is otherwise.
>
> Make devm_kfree() check if the passed pointer doesn't point to .rodata
> and if so - don't actually destroy the resource.
>
> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2018-09-28 7:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-28 7:14 [PATCH v5 0/4] devres: provide and use devm_kstrdup_const() Bartosz Golaszewski
2018-09-28 7:14 ` Bartosz Golaszewski
2018-09-28 7:14 ` [PATCH v5 1/4] devres: constify p in devm_kfree() Bartosz Golaszewski
2018-09-28 7:14 ` Bartosz Golaszewski
2018-09-28 7:28 ` Geert Uytterhoeven
2018-09-28 7:28 ` Geert Uytterhoeven
2018-09-28 7:14 ` [PATCH v5 2/4] mm: move is_kernel_rodata() to asm-generic/sections.h Bartosz Golaszewski
2018-09-28 7:14 ` Bartosz Golaszewski
2018-09-28 7:23 ` Rasmus Villemoes
2018-09-28 7:23 ` Rasmus Villemoes
2018-09-28 7:29 ` Geert Uytterhoeven
2018-09-28 7:29 ` Geert Uytterhoeven
2018-09-28 7:14 ` [PATCH v5 3/4] devres: provide devm_kstrdup_const() Bartosz Golaszewski
2018-09-28 7:14 ` Bartosz Golaszewski
2018-09-28 7:30 ` Geert Uytterhoeven [this message]
2018-09-28 7:30 ` Geert Uytterhoeven
2018-09-28 7:14 ` [PATCH v5 4/4] mailbox: tegra-hsp: use devm_kstrdup_const() Bartosz Golaszewski
2018-09-28 7:14 ` Bartosz Golaszewski
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='CAMuHMdVF9zD+KZ8E1-BCrn4W2QngABHqnCajOhk3Y=xpq4R=Cg@mail.gmail.com' \
--to=geert@linux-m68k.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=brgl@bgdev.pl \
--cc=gregkh@linuxfoundation.org \
--cc=jassisinghbrar@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=rafael@kernel.org \
--cc=thierry.reding@gmail.com \
/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).