mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Manuel Ebner <manuelebner@mailbox.org>
To: "Uwe Kleine-König" <ukleinek@kernel.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Vlastimil Babka (SUSE)" <vbabka@kernel.org>,
	"SeongJae Park" <sj@kernel.org>
Cc: Shuah Khan <skhan@linuxfoundation.org>,
	workflows@vger.kernel.org,  linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Documentation: Fix syntax of kmalloc_objs example in coding style doc
Date: Thu, 18 Jun 2026 11:19:47 +0200	[thread overview]
Message-ID: <adefff2087cb6fa78229bf7e12123a2b21066ede.camel@mailbox.org> (raw)
In-Reply-To: <20260529081006.2019687-2-ukleinek@kernel.org>

Thanks, I realized just now that I introduced this.
 Manuel

On Fri, 2026-05-29 at 10:10 +0200, Uwe Kleine-König wrote:
> The first parameter should match the variable that the allocated memory
> is assigned to. Fix the example accordingly, the one for kmalloc_obj got
> it right already.
> 
> Fixes: 7c6d969d5349 ("Documentation: adopt new coding style of type-aware kmalloc-
> family")
> Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
> ---
>  Documentation/process/coding-style.rst | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/process/coding-style.rst b/Documentation/process/coding-
> style.rst
> index a3bf75dc7c88..a8336582f60b 100644
> --- a/Documentation/process/coding-style.rst
> +++ b/Documentation/process/coding-style.rst
> @@ -959,13 +959,13 @@ The preferred form for allocating an array is the following:
>  
>  .. code-block:: c
>  
> -	p = kmalloc_objs(*ptr, n, ...);
> +	p = kmalloc_objs(*p, n, ...);
>  
>  The preferred form for allocating a zeroed array is the following:
>  
>  .. code-block:: c
>  
> -	p = kzalloc_objs(*ptr, n, ...);
> +	p = kzalloc_objs(*p, n, ...);
>  
>  Both forms check for overflow on the allocation size n * sizeof(...),
>  and return NULL if that occurred.
> 
> base-commit: f7af91adc230aa99e23330ecf85bc9badd9780ad

      parent reply	other threads:[~2026-06-18  9:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29  8:10 Uwe Kleine-König
2026-05-29  8:18 ` Geert Uytterhoeven
2026-06-01 18:48 ` Jonathan Corbet
2026-06-01 20:08 ` Kees Cook
2026-06-18  9:19 ` 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=adefff2087cb6fa78229bf7e12123a2b21066ede.camel@mailbox.org \
    --to=manuelebner@mailbox.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sj@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=ukleinek@kernel.org \
    --cc=vbabka@kernel.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

all inboxes | Powered by JetHome®