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

Dan Carpenter
2026-04-18T11:44:17Z

On Sat, Apr 18, 2026 at 12:45:19PM +0200, Manuel Ebner wrote:
> On Sat, 2026-04-18 at 13:27 +0300, Dan Carpenter wrote:
> > 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 <manuelebner@mailbox.org>
> >
> > Yeah.  Fix up the commit message and that could probably be merged
> > through the documentation tree.
>
> how do i fix the commit message?
> what's even the issue?

I just meant that you should remove the stuff like "Would a patch like
this one make sense?"...

regards,
dan carpenter