aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorKunwu Chan <chentao@kylinos.cn>2024-01-24 14:31:50 +0800
committerSteffen Klassert <steffen.klassert@secunet.com>2024-01-25 09:03:29 +0100
commitab1e1a38de240057ed108075abd1309c02e2a2a4 (patch)
tree65e87bb668a094e284c40b7d8939ac2e14f13b6a /net/ipv6
parent63b21caba17ef2df5982c7b75eb989100212b27b (diff)
downloadlinux-ab1e1a38de240057ed108075abd1309c02e2a2a4.tar.gz
xfrm6_tunnel: Use KMEM_CACHE instead of kmem_cache_create
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Signed-off-by: Kunwu Chan <chentao@kylinos.cn> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/xfrm6_tunnel.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c
index 1323f2f6928e2..0f3df26878a36 100644
--- a/net/ipv6/xfrm6_tunnel.c
+++ b/net/ipv6/xfrm6_tunnel.c
@@ -355,10 +355,7 @@ static int __init xfrm6_tunnel_init(void)
{
int rv;
- xfrm6_tunnel_spi_kmem = kmem_cache_create("xfrm6_tunnel_spi",
- sizeof(struct xfrm6_tunnel_spi),
- 0, SLAB_HWCACHE_ALIGN,
- NULL);
+ xfrm6_tunnel_spi_kmem = KMEM_CACHE(xfrm6_tunnel_spi, SLAB_HWCACHE_ALIGN);
if (!xfrm6_tunnel_spi_kmem)
return -ENOMEM;
rv = register_pernet_subsys(&xfrm6_tunnel_net_ops);