summaryrefslogtreecommitdiff
path: root/drivers/nvdimm
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 /drivers/nvdimm
parent323bbfcf1ef8836d0d2ad9e2c1f1c684f0e3b5b3 (diff)
downloadlinux-next-32a92f8c89326985e05dce8b22d3f0aa07a3e1bd.tar.gz
linux-next-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 'drivers/nvdimm')
-rw-r--r--drivers/nvdimm/btt.c6
-rw-r--r--drivers/nvdimm/nd_perf.c3
-rw-r--r--drivers/nvdimm/region_devs.c3
3 files changed, 4 insertions, 8 deletions
diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
index afbefc5f49bc..b6bef092f8b8 100644
--- a/drivers/nvdimm/btt.c
+++ b/drivers/nvdimm/btt.c
@@ -539,8 +539,7 @@ static int btt_freelist_init(struct arena_info *arena)
struct log_entry log_new;
u32 i, map_entry, log_oldmap, log_newmap;
- arena->freelist = kzalloc_objs(struct free_entry, arena->nfree,
- GFP_KERNEL);
+ arena->freelist = kzalloc_objs(struct free_entry, arena->nfree);
if (!arena->freelist)
return -ENOMEM;
@@ -733,8 +732,7 @@ static int btt_maplocks_init(struct arena_info *arena)
{
u32 i;
- arena->map_locks = kzalloc_objs(struct aligned_lock, arena->nfree,
- GFP_KERNEL);
+ arena->map_locks = kzalloc_objs(struct aligned_lock, arena->nfree);
if (!arena->map_locks)
return -ENOMEM;
diff --git a/drivers/nvdimm/nd_perf.c b/drivers/nvdimm/nd_perf.c
index 9bd8dff3d35a..e0b51438dc9b 100644
--- a/drivers/nvdimm/nd_perf.c
+++ b/drivers/nvdimm/nd_perf.c
@@ -195,8 +195,7 @@ static int create_cpumask_attr_group(struct nvdimm_pmu *nd_pmu)
}
/* Allocate memory for cpumask attribute group */
- nvdimm_pmu_cpumask_group = kzalloc_obj(*nvdimm_pmu_cpumask_group,
- GFP_KERNEL);
+ nvdimm_pmu_cpumask_group = kzalloc_obj(*nvdimm_pmu_cpumask_group);
if (!nvdimm_pmu_cpumask_group) {
kfree(pmu_events_attr);
kfree(attrs_group);
diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c
index c1eebff582d9..e35c2e18518f 100644
--- a/drivers/nvdimm/region_devs.c
+++ b/drivers/nvdimm/region_devs.c
@@ -1005,8 +1005,7 @@ static struct nd_region *nd_region_create(struct nvdimm_bus *nvdimm_bus,
}
nd_region =
- kzalloc_flex(*nd_region, mapping, ndr_desc->num_mappings,
- GFP_KERNEL);
+ kzalloc_flex(*nd_region, mapping, ndr_desc->num_mappings);
if (!nd_region)
return NULL;