diff options
author | Florian Westphal <fw@strlen.de> | 2019-05-03 17:46:19 +0200 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2019-06-06 08:34:50 +0200 |
commit | 4f518e802ccad30c9dccc895f2294398757b87c0 (patch) | |
tree | 535aacd8a10b6030fd4c61a1897a2ddbbc4ae6ba /net/ipv6/ipcomp6.c | |
parent | 4c203b0454b5b6bfafe2c4ab1b5472d4a7a8a0f2 (diff) | |
download | linux-4f518e802ccad30c9dccc895f2294398757b87c0.tar.bz2 |
xfrm: remove type and offload_type map from xfrm_state_afinfo
Only a handful of xfrm_types exist, no need to have 512 pointers for them.
Reduces size of afinfo struct from 4k to 120 bytes on 64bit platforms.
Also, the unregister function doesn't need to return an error, no single
caller does anything useful with it.
Just place a WARN_ON() where needed instead.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/ipv6/ipcomp6.c')
-rw-r--r-- | net/ipv6/ipcomp6.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index 51fd33294c7c..3752bd3e92ce 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c @@ -206,8 +206,7 @@ static void __exit ipcomp6_fini(void) { if (xfrm6_protocol_deregister(&ipcomp6_protocol, IPPROTO_COMP) < 0) pr_info("%s: can't remove protocol\n", __func__); - if (xfrm_unregister_type(&ipcomp6_type, AF_INET6) < 0) - pr_info("%s: can't remove xfrm type\n", __func__); + xfrm_unregister_type(&ipcomp6_type, AF_INET6); } module_init(ipcomp6_init); |