Maintainer workflows discussions
 help / color / mirror / Atom feed
From: Manuel Ebner <manuelebner@mailbox.org>
To: Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
		linux-doc@vger.kernel.org, Kees Cook <kees@kernel.org>,
		linux-kernel@vger.kernel.org
Cc: workflows@vger.kernel.org, linux-mm@kvack.org,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Janitors <kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH v3 3/3] Documentation: deprecated.rst: kmalloc-family: mark argument as optional
Date: Mon, 20 Jul 2026 10:38:45 +0200	[thread overview]
Message-ID: <0ef30a524e15530c6fc0842066367b1f86e679f2.camel@mailbox.org> (raw)
In-Reply-To: <871pg0ras8.fsf@trenco.lwn.net>

On Mon, 2026-04-27 at 03:51 -0600, Jonathan Corbet wrote:
> Manuel Ebner <manuelebner@mailbox.org> writes:
> 
> > put the optional argument (gfp) in square brackets
> > add whitespace for readability
> > 
> > eg. ptr = kmalloc_obj(*ptr, gfp);
> >  -> ptr = kmalloc_obj(*ptr [, gfp] );
> > 
> > Signed-off-by: Manuel Ebner <manuelebner@mailbox.org>
> > ---
> >  Documentation/process/deprecated.rst | 12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> > 
> > diff --git a/Documentation/process/deprecated.rst
> > b/Documentation/process/deprecated.rst
> > index fed56864d036..b431993fd08e 100644
> > --- a/Documentation/process/deprecated.rst
> > +++ b/Documentation/process/deprecated.rst
> > @@ -392,12 +392,12 @@ allocations. For example, these open coded assignments::
> >  
> >  become, respectively::
> >  
> > -	ptr = kmalloc_obj(*ptr, gfp);
> > -	ptr = kzalloc_obj(*ptr, gfp);
> > -	ptr = kmalloc_objs(*ptr, count, gfp);
> > -	ptr = kzalloc_objs(*ptr, count, gfp);
> > -	ptr = kmalloc_flex(*ptr, flex_member, count, gfp);
> > -	__auto_type ptr = kmalloc_obj(struct foo, gfp);
> > +	ptr = kmalloc_obj(*ptr [, gfp] );
> > +	ptr = kzalloc_obj(*ptr [, gfp] );
> > +	ptr = kmalloc_objs(*ptr, count [, gfp] );
> > +	ptr = kzalloc_objs(*ptr, count [, gfp] );
> > +	ptr = kmalloc_flex(*ptr, flex_member, count [, gfp] );
> > +	__auto_type ptr = kmalloc_obj(struct foo [, gfp] );
> >  
> 
> Marking the GFP argument as optional is fine, but the documentation
> should surely say what the default is.
> 
> There are, of course, other kmalloc()-related entries in that file that
> could use an update, but that is a job for another time, I guess.

KTODO: Update the sections suggesting to use th deprecated
kamlloc(_array)() functions.

Thanks
 Manuel

> Thanks,
> 
> jon

      reply	other threads:[~2026-07-20  8:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-24 17:47 [PATCH v3 0/3] Documentation: adopt new coding style of type-aware kmalloc-family Manuel Ebner
2026-04-24 17:51 ` [PATCH v3 1/3] " Manuel Ebner
2026-04-24 17:57 ` [PATCH v3 3/3] Documentation: deprecated.rst: kmalloc-family: mark argument as optional Manuel Ebner
2026-04-27  9:51   ` Jonathan Corbet
2026-07-20  8:38     ` Manuel Ebner [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=0ef30a524e15530c6fc0842066367b1f86e679f2.camel@mailbox.org \
    --to=manuelebner@mailbox.org \
    --cc=corbet@lwn.net \
    --cc=geert@linux-m68k.org \
    --cc=kees@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=skhan@linuxfoundation.org \
    --cc=workflows@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