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

2018-09-28 Thread Geert Uytterhoeven
On Fri, Sep 28, 2018 at 9:14 AM Bartosz Golaszewski 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 poi

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

2018-09-28 Thread Bartosz Golaszewski
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