Re: [PATCH] Documentation: adopt new coding style of type-aware kmalloc-family

Dan Carpenter <[email protected]>
Newsgroups dev.linux.lists.linux-kernel-mentees,org.kernel.vger.kernel-janitors,org.kernel.vger.linux-newbie
Message-ID <[email protected]>
On Sat, Apr 18, 2026 at 11:30:48AM +0200, Manuel Ebner wrote:
> Would a patch like this one make sense?
> I think i need help with the change log. Is there something to much or missing?
> 
> ptr = kmalloc(sizeof(*ptr), gfp);
>  -> ptr = kmalloc_obj(*ptr, gfp);
> 
>  This one is done. The ones below are not done yet.
> 
> ptr = kmalloc(sizeof(struct some_obj_name), gfp);
>  -> ptr = kmalloc_obj(*ptr, gfp);
> ptr = kzalloc(sizeof(*ptr), gfp);
>  > ptr = kzalloc_obj(*ptr, gfp);
> ptr = kmalloc_array(count, sizeof(*ptr), gfp);
>  -> ptr = kmalloc_objs(*ptr, count, gfp);
> ptr = kcalloc(count, sizeof(*ptr), gfp);
>  -> ptr = kzalloc_objs(*ptr, count, gfp);
> 
> change log:
> [PATCH] Documentation: adopt new coding style of type-aware kmalloc-family
> 
> Update the documentation to reflect new type-aware kmalloc-family as
> suggested in commit 2932ba8d9c99 ("slab: Introduce kmalloc_obj() and family")
> 
> ptr = kmalloc(sizeof(*ptr), gfp);
>  -> ptr = kmalloc_obj(*ptr, gfp);
> 
> Signed-off-by: Manuel Ebner <[email protected]>

Yeah.  Fix up the commit message and that could probably be merged
through the documentation tree.  Probably no need to split it up
by subsystem, but you should CC the affected subsystems.

regards,
dan carpener
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.