summaryrefslogtreecommitdiff
path: root/block
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 /block
parent323bbfcf1ef8836d0d2ad9e2c1f1c684f0e3b5b3 (diff)
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 'block')
-rw-r--r--block/blk-crypto-fallback.c3
-rw-r--r--block/blk-crypto-profile.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/block/blk-crypto-fallback.c b/block/blk-crypto-fallback.c
index 9a05abe8d43f..24b8b1c40e25 100644
--- a/block/blk-crypto-fallback.c
+++ b/block/blk-crypto-fallback.c
@@ -546,8 +546,7 @@ static int blk_crypto_fallback_init(void)
goto out;
/* Dynamic allocation is needed because of lockdep_register_key(). */
- blk_crypto_fallback_profile = kzalloc_obj(*blk_crypto_fallback_profile,
- GFP_KERNEL);
+ blk_crypto_fallback_profile = kzalloc_obj(*blk_crypto_fallback_profile);
if (!blk_crypto_fallback_profile) {
err = -ENOMEM;
goto fail_free_bioset;
diff --git a/block/blk-crypto-profile.c b/block/blk-crypto-profile.c
index 970880d9adf4..4ac74443687a 100644
--- a/block/blk-crypto-profile.c
+++ b/block/blk-crypto-profile.c
@@ -120,8 +120,7 @@ int blk_crypto_profile_init(struct blk_crypto_profile *profile,
profile->log_slot_ht_size = ilog2(slot_hashtable_size);
profile->slot_hashtable =
- kvmalloc_objs(profile->slot_hashtable[0], slot_hashtable_size,
- GFP_KERNEL);
+ kvmalloc_objs(profile->slot_hashtable[0], slot_hashtable_size);
if (!profile->slot_hashtable)
goto err_destroy;
for (i = 0; i < slot_hashtable_size; i++)