From: Harry Yoo <harry@kernel.org>
To: Randy Dunlap <rdunlap@infradead.org>, linux-kernel@vger.kernel.org
Cc: Vlastimil Babka <vbabka@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, stable@vger.kernel.org,
"kees@kernel.org" <kees@kernel.org>,
Jonathan Corbet <corbet@lwn.net>
Subject: Re: [PATCH] slab: recognize @GFP parameter as optional in kernel-doc
Date: Wed, 17 Jun 2026 14:16:28 +0900 [thread overview]
Message-ID: <7ab220a8-2bec-4b00-8bf5-e76dff93fe13@kernel.org> (raw)
In-Reply-To: <79c90e12-c157-4d91-a7a4-54225d876d56@infradead.org>
[-- Attachment #1.1: Type: text/plain, Size: 1223 bytes --]
On 6/17/26 1:38 PM, Randy Dunlap wrote:
> On 6/16/26 8:25 PM, Harry Yoo wrote:
>> [+Cc Kees and Jonathan]
>>
>> On 6/17/26 4:39 AM, 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>
>>> ---
>>
>> I think there is no better way to specify an optional parameter, so:
>> Acked-by: Harry Yoo (Oracle) <harry@kernel.org>
>>
>> By the way, the doc should probably say that it is GFP_KERNEL when it is
>> not specified?
>
> How about (in general):
>
> * @...: optional GFP flags for the allocation (GFP_KERNEL when not specified)
>
> ?
Looks good to me!
--
Cheers,
Harry / Hyeonggon
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2026-06-17 5:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 19:39 [PATCH] slab: recognize @GFP parameter as optional in kernel-doc Randy Dunlap
2026-06-17 3:25 ` Harry Yoo
2026-06-17 4:38 ` Randy Dunlap
2026-06-17 5:16 ` Harry Yoo [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=7ab220a8-2bec-4b00-8bf5-e76dff93fe13@kernel.org \
--to=harry@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rdunlap@infradead.org \
--cc=stable@vger.kernel.org \
--cc=vbabka@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