Re: [PATCH v1 1/1] mm, slab: fold need_slab_obj_ext() into its only user

From: Vlastimil Babka
Date: Thu Apr 24 2025 - 13:15:13 EST


On 4/24/25 18:48, Andy Shevchenko wrote:
> need_slab_obj_ext() is used only in one place, fold it into there.
> Without that, clang can't build kernel with `make W=1` when
> CONFIG_WERROR=y, which is default in the x86 configurations.

Note that gcc doesn't warn on this even with W=1.

Is really clang + W=1 + CONFIG_WERROR building ok these days except this one
unused function?

> mm/slub.c:2079:20: error: unused function 'need_slab_obj_ext' [-Werror,-Wunused-function]
>
> To solve this, fold need_slab_obj_ext() into its only user.
>
> Fixes: e33b7ae3d802 ("mm, slab: clean up slab->obj_exts always")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

Thanks, I've folded the fix in.