[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aWAOJwMURdOl_lqG@smile.fi.intel.com>
Date: Thu, 8 Jan 2026 22:05:59 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Dmitry Antipov <dmantipov@...dex.ru>
Cc: Carlos Maiolino <cem@...nel.org>, Christoph Hellwig <hch@...radead.org>,
Kees Cook <kees@...nel.org>, Andy Shevchenko <andy@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-xfs@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH v3 1/2] lib: introduce simple error-checking wrapper for
memparse()
On Thu, Jan 08, 2026 at 07:52:15PM +0300, Dmitry Antipov wrote:
> Introduce 'memvalue()' which uses 'memparse()' to parse a string
> with optional memory suffix into a non-negative number. If parsing
> has succeeded, returns 0 and stores the result at the location
> specified by the second argument. Otherwise returns -EINVAL and
> leaves the location untouched.
...
> +/**
> + * memvalue - Wrap memparse() with simple error detection
> + * @ptr: Where parse begins
> + * @valptr: Where to store result
> + *
> + * Unconditionally returns -EINVAL for a presumably negative value.
> + * Otherwise uses memparse() to parse a string into a number stored
> + * at @valptr and returns 0 or -EINVAL if an unrecognized character
> + * was encountered. For a non-zero return value, memory at @valptr
> + * is left untouched.
> + */
There are two problems with this kernel-doc:
1) inherited one with strange indentation;
2) missing Return section (run kernel-doc validator with -Wreturn, for example).
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists