From 32a92f8c89326985e05dce8b22d3f0aa07a3e1bd Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 21 Feb 2026 20:03:00 -0800 Subject: 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 --- block/blk-crypto-fallback.c | 3 +-- block/blk-crypto-profile.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'block') 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++) -- cgit v1.2.3