Re: [PATCH v5 3/4] devres: provide devm_kstrdup_const()

From: Geert Uytterhoeven
Date: Fri Sep 28 2018 - 03:31:00 EST

On Fri, Sep 28, 2018 at 9:14 AM Bartosz Golaszewski <brgl@xxxxxxxx> 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@xxxxxxxx>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
> Acked-by: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx>

Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>



Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

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