Skip to content

Commit 2dc23b6

Browse files
KunWuChankuba-moo
authored andcommitted
net: bridge: Use KMEM_CACHE instead of kmem_cache_create
commit 0a31bd5 ("KMEM_CACHE(): simplify slab cache creation") introduces a new macro. Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Signed-off-by: Kunwu Chan <[email protected]> Acked-by: Nikolay Aleksandrov <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 57f2c63 commit 2dc23b6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

net/bridge/br_fdb.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ static struct kmem_cache *br_fdb_cache __read_mostly;
3535

3636
int __init br_fdb_init(void)
3737
{
38-
br_fdb_cache = kmem_cache_create("bridge_fdb_cache",
39-
sizeof(struct net_bridge_fdb_entry),
40-
0,
41-
SLAB_HWCACHE_ALIGN, NULL);
38+
br_fdb_cache = KMEM_CACHE(net_bridge_fdb_entry, SLAB_HWCACHE_ALIGN);
4239
if (!br_fdb_cache)
4340
return -ENOMEM;
4441

0 commit comments

Comments
 (0)