summaryrefslogtreecommitdiff
path: root/net/smc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 20:03:00 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 20:03:00 -0800
commit32a92f8c89326985e05dce8b22d3f0aa07a3e1bd (patch)
tree65f84985b9ed2d5cf3c5243aca78d9428e25c312 /net/smc
parent323bbfcf1ef8836d0d2ad9e2c1f1c684f0e3b5b3 (diff)
downloadlwn-32a92f8c89326985e05dce8b22d3f0aa07a3e1bd.tar.gz
lwn-32a92f8c89326985e05dce8b22d3f0aa07a3e1bd.zip
Convert more 'alloc_obj' cases to default GFP_KERNEL arguments
This converts some of the visually simpler cases that have been split over multiple lines. I only did the ones that are easy to verify the resulting diff by having just that final GFP_KERNEL argument on the next line. Somebody should probably do a proper coccinelle script for this, but for me the trivial script actually resulted in an assertion failure in the middle of the script. I probably had made it a bit _too_ trivial. So after fighting that far a while I decided to just do some of the syntactically simpler cases with variations of the previous 'sed' scripts. The more syntactically complex multi-line cases would mostly really want whitespace cleanup anyway. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/smc')
-rw-r--r--net/smc/smc_wr.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/net/smc/smc_wr.c b/net/smc/smc_wr.c
index b423abb4210d..c9f999ae10e0 100644
--- a/net/smc/smc_wr.c
+++ b/net/smc/smc_wr.c
@@ -749,12 +749,10 @@ int smc_wr_alloc_link_mem(struct smc_link *link)
GFP_KERNEL);
if (!link->wr_rx_bufs)
goto no_mem_wr_tx_bufs;
- link->wr_tx_ibs = kzalloc_objs(link->wr_tx_ibs[0], link->max_send_wr,
- GFP_KERNEL);
+ link->wr_tx_ibs = kzalloc_objs(link->wr_tx_ibs[0], link->max_send_wr);
if (!link->wr_tx_ibs)
goto no_mem_wr_rx_bufs;
- link->wr_rx_ibs = kzalloc_objs(link->wr_rx_ibs[0], link->max_recv_wr,
- GFP_KERNEL);
+ link->wr_rx_ibs = kzalloc_objs(link->wr_rx_ibs[0], link->max_recv_wr);
if (!link->wr_rx_ibs)
goto no_mem_wr_tx_ibs;
link->wr_tx_rdmas = kzalloc_objs(link->wr_tx_rdmas[0],
@@ -765,8 +763,7 @@ int smc_wr_alloc_link_mem(struct smc_link *link)
link->max_send_wr, GFP_KERNEL);
if (!link->wr_tx_rdma_sges)
goto no_mem_wr_tx_rdmas;
- link->wr_tx_sges = kzalloc_objs(link->wr_tx_sges[0], link->max_send_wr,
- GFP_KERNEL);
+ link->wr_tx_sges = kzalloc_objs(link->wr_tx_sges[0], link->max_send_wr);
if (!link->wr_tx_sges)
goto no_mem_wr_tx_rdma_sges;
link->wr_rx_sges = kcalloc(link->max_recv_wr,
@@ -790,12 +787,10 @@ int smc_wr_alloc_link_mem(struct smc_link *link)
link->wr_tx_v2_ib = kzalloc_obj(*link->wr_tx_v2_ib);
if (!link->wr_tx_v2_ib)
goto no_mem_tx_compl;
- link->wr_tx_v2_sge = kzalloc_obj(*link->wr_tx_v2_sge,
- GFP_KERNEL);
+ link->wr_tx_v2_sge = kzalloc_obj(*link->wr_tx_v2_sge);
if (!link->wr_tx_v2_sge)
goto no_mem_v2_ib;
- link->wr_tx_v2_pend = kzalloc_obj(*link->wr_tx_v2_pend,
- GFP_KERNEL);
+ link->wr_tx_v2_pend = kzalloc_obj(*link->wr_tx_v2_pend);
if (!link->wr_tx_v2_pend)
goto no_mem_v2_sge;
}