Commit ab1e1a38 authored by Kunwu Chan's avatar Kunwu Chan Committed by Steffen Klassert
Browse files

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: default avatarKunwu Chan <chentao@kylinos.cn>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent 63b21cab
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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);