Skip to content

Commit 645b9ad

Browse files
KRIISHSHARMAkees
authored andcommitted
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>
1 parent fbcc215 commit 645b9ad

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

include/linux/string.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,10 @@ static inline void memzero_explicit(void *s, size_t count)
371371
* kbasename - return the last part of a pathname.
372372
*
373373
* @path: path to extract the filename from.
374+
*
375+
* Returns:
376+
* Pointer to the filename portion inside @path. If no '/' exists,
377+
* returns @path unchanged.
374378
*/
375379
static inline const char *kbasename(const char *path)
376380
{
@@ -556,6 +560,9 @@ static __always_inline size_t str_has_prefix(const char *str, const char *prefix
556560
* strstarts - does @str start with @prefix?
557561
* @str: string to examine
558562
* @prefix: prefix to look for.
563+
*
564+
* Returns:
565+
* True if @str begins with @prefix. False in all other cases.
559566
*/
560567
static inline bool strstarts(const char *str, const char *prefix)
561568
{

0 commit comments

Comments
 (0)