net: dccp: Simplify the allocation of slab caches in dccp_ackvec_init
Subsystems (2)
PATCH 1/1 net: dccp: Simplify the allocation of slab caches in dccp_ackvec_init
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]>
--- net/dccp/ackvec.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
net/dccp/ackvec.c +2 -6
@@ -376,15 +376,11 @@ EXPORT_SYMBOL_GPL(dccp_ackvec_parsed_cleanup);int __init dccp_ackvec_init (void ) { - dccp_ackvec_slab =kmem_cache_create ("dccp_ackvec" , -sizeof (struct dccp_ackvec ),0 , -SLAB_HWCACHE_ALIGN ,NULL ); + dccp_ackvec_slab =KMEM_CACHE (dccp_ackvec,SLAB_HWCACHE_ALIGN );if (dccp_ackvec_slab ==NULL ) goto out_err; - dccp_ackvec_record_slab =kmem_cache_create ("dccp_ackvec_record" , -sizeof (struct dccp_ackvec_record ), -0 ,SLAB_HWCACHE_ALIGN ,NULL ); + dccp_ackvec_record_slab =KMEM_CACHE (dccp_ackvec_record,SLAB_HWCACHE_ALIGN );if (dccp_ackvec_record_slab ==NULL ) goto out_destroy_slab;
Signature · 1 line
2.39.2
Quoted 4 lines · Wed, Jan 31, 2024 at 10:08:51AM CET, [email protected] wrote:
Use the new
KMEM_CACHE()macro instead of directkmem_cache_createto simplify the creation of SLAB caches.Signed-off-by Kunwu Chan <[email protected]>
Reviewed-by Jiri Pirko <[email protected]>
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Quoted 7 lines · On Wed, 31 Jan 2024 17:08:51 +0800 you wrote:
Use the new
KMEM_CACHE()macro instead of directkmem_cache_createto simplify the creation of SLAB caches.Signed-off-by Kunwu Chan <[email protected]>--- net/dccp/ackvec.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
Here is the summary with links:
- [net-next] net: dccp: Simplify the allocation of slab caches in dccp_ackvec_init
https://git.kernel.org/netdev/net-next/c/20ea9327c2fd
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html