* [PATCH] net: rds: Simplify the allocation of slab caches in rds_conn_init
@ 2024-01-24 7:58 Kunwu Chan
2024-01-31 1:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Kunwu Chan @ 2024-01-24 7:58 UTC (permalink / raw)
To: santosh.shilimkar, davem, edumazet, kuba, pabeni
Cc: netdev, linux-rdma, rds-devel, linux-kernel, Kunwu Chan
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>
---
net/rds/connection.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/rds/connection.c b/net/rds/connection.c
index b4cc699c5fad..c749c5525b40 100644
--- a/net/rds/connection.c
+++ b/net/rds/connection.c
@@ -829,9 +829,7 @@ int rds_conn_init(void)
if (ret)
return ret;
- rds_conn_slab = kmem_cache_create("rds_connection",
- sizeof(struct rds_connection),
- 0, 0, NULL);
+ rds_conn_slab = KMEM_CACHE(rds_connection, 0);
if (!rds_conn_slab) {
rds_loop_net_exit();
return -ENOMEM;
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: rds: Simplify the allocation of slab caches in rds_conn_init
2024-01-24 7:58 [PATCH] net: rds: Simplify the allocation of slab caches in rds_conn_init Kunwu Chan
@ 2024-01-31 1:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-01-31 1:20 UTC (permalink / raw)
To: Kunwu Chan
Cc: santosh.shilimkar, davem, edumazet, kuba, pabeni, netdev,
linux-rdma, rds-devel, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 24 Jan 2024 15:58:01 +0800 you wrote:
> 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>
> ---
> net/rds/connection.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Here is the summary with links:
- net: rds: Simplify the allocation of slab caches in rds_conn_init
https://git.kernel.org/netdev/net-next/c/047a7d261be6
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-31 1:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-24 7:58 [PATCH] net: rds: Simplify the allocation of slab caches in rds_conn_init Kunwu Chan
2024-01-31 1:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).