From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: Randy Dunlap <rdunlap@infradead.org>, linux-kernel@vger.kernel.org
Cc: "Harry Yoo (Oracle)" <harry@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, stable@vger.kernel.org,
Kees Cook <kees@kernel.org>, Jonathan Corbet <corbet@lwn.net>
Subject: Re: [PATCH v2] slab: recognize @GFP parameter as optional in kernel-doc
Date: Wed, 17 Jun 2026 20:16:42 +0200 [thread overview]
Message-ID: <89da8f81-9e6c-4923-be0e-7e29c7fdb68b@kernel.org> (raw)
In-Reply-To: <20260617163125.2716279-1-rdunlap@infradead.org>
On 6/17/26 18:31, Randy Dunlap wrote:
> Since the @GFP parameter in kmalloc_obj() etc. is now optional, change
> the kernel-doc to indicate that it is optional. This avoids kernel-doc
> warnings:
>
> WARNING: include/linux/slab.h:1101 Excess function parameter 'GFP' description in 'kmalloc_obj'
> WARNING: include/linux/slab.h:1113 Excess function parameter 'GFP' description in 'kmalloc_objs'
> WARNING: include/linux/slab.h:1128 Excess function parameter 'GFP' description in 'kmalloc_flex'
>
> Fixes: e19e1b480ac7 ("add default_gfp() helper macro and use it in the new *alloc_obj() helpers")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Acked-by: Harry Yoo (Oracle) <harry@kernel.org>
Added to slab/for-next, thanks!
> ---
> v2: add default value for GFP flags to the description (Harry)
>
> Cc: Vlastimil Babka <vbabka@kernel.org>
> Cc: Harry Yoo <harry@kernel.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: linux-mm@kvack.org
> Cc: stable@vger.kernel.org
> Cc: Kees Cook <kees@kernel.org>
> Cc: Jonathan Corbet <corbet@lwn.net>
>
> include/linux/slab.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> --- linux-next-20260615.orig/include/linux/slab.h
> +++ linux-next-20260615/include/linux/slab.h
> @@ -1094,7 +1094,7 @@ void *kmalloc_nolock(size_t size, gfp_t
> /**
> * kmalloc_obj - Allocate a single instance of the given type
> * @VAR_OR_TYPE: Variable or type to allocate.
> - * @GFP: GFP flags for the allocation.
> + * @...: optional GFP flags for the allocation (GFP_KERNEL when not specified).
> *
> * Returns: newly allocated pointer to a @VAR_OR_TYPE on success, or NULL
> * on failure.
> @@ -1106,7 +1106,7 @@ void *kmalloc_nolock(size_t size, gfp_t
> * kmalloc_objs - Allocate an array of the given type
> * @VAR_OR_TYPE: Variable or type to allocate an array of.
> * @COUNT: How many elements in the array.
> - * @GFP: GFP flags for the allocation.
> + * @...: optional GFP flags for the allocation (GFP_KERNEL when not specified).
> *
> * Returns: newly allocated pointer to array of @VAR_OR_TYPE on success,
> * or NULL on failure.
> @@ -1119,7 +1119,7 @@ void *kmalloc_nolock(size_t size, gfp_t
> * @VAR_OR_TYPE: Variable or type to allocate (with its flex array).
> * @FAM: The name of the flexible array member of the structure.
> * @COUNT: How many flexible array member elements are desired.
> - * @GFP: GFP flags for the allocation.
> + * @...: optional GFP flags for the allocation (GFP_KERNEL when not specified).
> *
> * Returns: newly allocated pointer to @VAR_OR_TYPE on success, NULL on
> * failure. If @FAM has been annotated with __counted_by(), the allocation
prev parent reply other threads:[~2026-06-17 18:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 16:31 Randy Dunlap
2026-06-17 18:16 ` Vlastimil Babka (SUSE) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=89da8f81-9e6c-4923-be0e-7e29c7fdb68b@kernel.org \
--to=vbabka@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=harry@kernel.org \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rdunlap@infradead.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome