diff options
| author | Kriish Sharma <kriish.sharma2006@gmail.com> | 2025-11-18 18:48:28 +0000 |
|---|---|---|
| committer | Kees Cook <kees@kernel.org> | 2025-11-24 12:44:05 -0800 |
| commit | 645b9ad2dc6b2d6d31e2944bd7f680f3f9d827ea (patch) | |
| tree | f8dc26042059f3e296121a6aa19232bee2cc9ad6 | |
| parent | fbcc2150aa40655451c28b1a8d750f8468f3b092 (diff) | |
string: Add missing kernel-doc return descriptions
While running kernel-doc validation on linux-next, warnings were emitted
for functions in include/linux/string.h due to missing return value
documentation:
Warning: include/linux/string.h:375 No description found for return value of 'kbasename'
Warning: include/linux/string.h:560 No description found for return value of 'strstarts'
This patch adds the missing return value descriptions for both functions
and clears the related kernel-doc warnings.
Signed-off-by: Kriish Sharma <kriish.sharma2006@gmail.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://patch.msgid.link/20251118184828.2621595-1-kriish.sharma2006@gmail.com
Signed-off-by: Kees Cook <kees@kernel.org>
| -rw-r--r-- | include/linux/string.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/string.h b/include/linux/string.h index fdd3442c6bcb..434b152df66a 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -371,6 +371,10 @@ static inline void memzero_explicit(void *s, size_t count) * kbasename - return the last part of a pathname. * * @path: path to extract the filename from. + * + * Returns: + * Pointer to the filename portion inside @path. If no '/' exists, + * returns @path unchanged. */ static inline const char *kbasename(const char *path) { @@ -556,6 +560,9 @@ static __always_inline size_t str_has_prefix(const char *str, const char *prefix * strstarts - does @str start with @prefix? * @str: string to examine * @prefix: prefix to look for. + * + * Returns: + * True if @str begins with @prefix. False in all other cases. */ static inline bool strstarts(const char *str, const char *prefix) { |