summaryrefslogtreecommitdiff
path: root/net/tls
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /net/tls
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/' to convert the new alloc_obj() users that had a simple GFP_KERNEL argument to just drop that argument. Note that due to the extreme simplicity of the scripting, any slightly more complex cases spread over multiple lines would not be triggered: they definitely exist, but this covers the vast bulk of the cases, and the resulting diff is also then easier to check automatically. For the same reason the 'flex' versions will be done as a separate conversion. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/tls')
-rw-r--r--net/tls/tls_device.c8
-rw-r--r--net/tls/tls_sw.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c
index 7a85ef064e4c..99c8eff9783e 100644
--- a/net/tls/tls_device.c
+++ b/net/tls/tls_device.c
@@ -346,7 +346,7 @@ static int tls_create_new_record(struct tls_offload_context_tx *offload_ctx,
struct tls_record_info *record;
skb_frag_t *frag;
- record = kmalloc_obj(*record, GFP_KERNEL);
+ record = kmalloc_obj(*record);
if (!record)
return -ENOMEM;
@@ -1040,7 +1040,7 @@ static struct tls_offload_context_tx *alloc_offload_ctx_tx(struct tls_context *c
struct tls_offload_context_tx *offload_ctx;
__be64 rcd_sn;
- offload_ctx = kzalloc_obj(*offload_ctx, GFP_KERNEL);
+ offload_ctx = kzalloc_obj(*offload_ctx);
if (!offload_ctx)
return NULL;
@@ -1110,7 +1110,7 @@ int tls_set_device_offload(struct sock *sk)
memcpy(ctx->tx.iv + cipher_desc->salt, iv, cipher_desc->iv);
memcpy(ctx->tx.rec_seq, rec_seq, cipher_desc->rec_seq);
- start_marker_record = kmalloc_obj(*start_marker_record, GFP_KERNEL);
+ start_marker_record = kmalloc_obj(*start_marker_record);
if (!start_marker_record) {
rc = -ENOMEM;
goto release_netdev;
@@ -1224,7 +1224,7 @@ int tls_set_device_offload_rx(struct sock *sk, struct tls_context *ctx)
goto release_lock;
}
- context = kzalloc_obj(*context, GFP_KERNEL);
+ context = kzalloc_obj(*context);
if (!context) {
rc = -ENOMEM;
goto release_lock;
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index 36bacedd6177..7877c238e758 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -2698,7 +2698,7 @@ static struct tls_sw_context_tx *init_ctx_tx(struct tls_context *ctx, struct soc
struct tls_sw_context_tx *sw_ctx_tx;
if (!ctx->priv_ctx_tx) {
- sw_ctx_tx = kzalloc_obj(*sw_ctx_tx, GFP_KERNEL);
+ sw_ctx_tx = kzalloc_obj(*sw_ctx_tx);
if (!sw_ctx_tx)
return NULL;
} else {
@@ -2719,7 +2719,7 @@ static struct tls_sw_context_rx *init_ctx_rx(struct tls_context *ctx)
struct tls_sw_context_rx *sw_ctx_rx;
if (!ctx->priv_ctx_rx) {
- sw_ctx_rx = kzalloc_obj(*sw_ctx_rx, GFP_KERNEL);
+ sw_ctx_rx = kzalloc_obj(*sw_ctx_rx);
if (!sw_ctx_rx)
return NULL;
} else {