lib/string_helpers: Change returned value of the strreplace()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 5 Jun 2023 17:05:52 +0000 (20:05 +0300)
committerKees Cook <keescook@chromium.org>
Mon, 5 Jun 2023 22:31:12 +0000 (15:31 -0700)
commitd01a77afd6bef1b3a2ed15e8ca6887ca7da0cddc
treeff135babefe273e172313fe59590cdd79ac512c1
parent7afb6d8fa81fd8d332f70ead5e35d8c90abb8165
lib/string_helpers: Change returned value of the strreplace()

It's more useful to return the pointer to the string itself
with strreplace(), so it may be used like

attr->name = strreplace(name, '/', '_');

While at it, amend the kernel documentation.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230605170553.7835-3-andriy.shevchenko@linux.intel.com
include/linux/string.h
lib/string_helpers.c