Re: [PATCH v2 03/13] mm/slab: remove objs_per_slab()
From: Hao Li
Date: Thu Jul 23 2026 - 07:30:22 EST
On Mon, Jul 20, 2026 at 04:16:17PM +0200, Vlastimil Babka (SUSE) wrote:
> The function has an unused kmem_cache argument and almost nothing uses
> it anyway; doing slab->objects is simpler. Remove it with the last two
> users. KUNIT_EXPECT_EQ() needs a cast to avoid "error: ‘typeof’ applied
> to a bit-field" but we don't need to keep a wrapper just for that.
>
> Reviewed-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>
> Signed-off-by: Vlastimil Babka (SUSE) <vbabka@xxxxxxxxxx>
> ---
> mm/kfence/kfence_test.c | 2 +-
> mm/slab.h | 6 ------
> mm/slub.c | 3 +--
> 3 files changed, 2 insertions(+), 9 deletions(-)
>
Looks good to me.
Reviewed-by: Hao Li <hao.li@xxxxxxxxx>
--
Thanks,
Hao