Re: [PATCH v2 03/13] mm/slab: remove objs_per_slab()

Hao Li <[email protected]> Thu, 23 Jul 2026 19:29:17 +0800
Newsgroups org.kernel.vger.cgroups,org.kernel.vger.linux-kernel,org.kvack.linux-mm
Message-ID <amH619DxX4_rO6kM@fedora>
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 <[email protected]>
> Signed-off-by: Vlastimil Babka (SUSE) <[email protected]>
> ---
>  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 <[email protected]>

-- 
Thanks,
Hao