Re: [PATCH] slab: Use %s instead of function name

From: David Rientjes
Date: Fri Jun 18 2021 - 15:33:00 EST


On Fri, 18 Jun 2021, Lukas Bulwahn wrote:

> > It is better to replace the function name with %s.
> >
> > Signed-off-by: gumingtao <gumingtao@xxxxxxxxxx>
> > ---
> > mm/slab_common.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/mm/slab_common.c b/mm/slab_common.c
> > index a4a5714..36127dc 100644
> > --- a/mm/slab_common.c
> > +++ b/mm/slab_common.c
> > @@ -381,8 +381,8 @@ kmem_cache_create_usercopy(const char *name,
> > panic("kmem_cache_create: Failed to create slab '%s'. Error %d\n",
>
> I am just wondering:
>
> Can you also make that refactoring change for the panic() call as well?
>
> How about checking the whole file for such patterns and doing that
> change for all occurrences?
>

Yeah, that would be ideal if gumingtao is willing to do it. These are
some instances where the function name actually mismatches. gumingtao,
would you be willing to do this?