Convert 'alloc_flex' family to use the new default GFP_KERNEL argument

This is the exact same thing as the 'alloc_obj()' version, only much
smaller because there are a lot fewer users of the *alloc_flex()
interface.

As with alloc_obj() version, this was done entirely with mindless brute
force, using the same script, except using 'flex' in the pattern rather
than 'objs*'.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Linus Torvalds
2026-02-21 17:06:51 -08:00
parent bf4afc53b7
commit 323bbfcf1e
310 changed files with 352 additions and 352 deletions

View File

@@ -776,7 +776,7 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
}
numvirtchips = cfi->numchips * numparts;
newcfi = kmalloc_flex(*newcfi, chips, numvirtchips, GFP_KERNEL);
newcfi = kmalloc_flex(*newcfi, chips, numvirtchips);
if (!newcfi)
return -ENOMEM;
shared = kmalloc_objs(struct flchip_shared, cfi->numchips,

View File

@@ -134,7 +134,7 @@ static struct cfi_private *genprobe_ident_chips(struct map_info *map, struct chi
* our caller, and copy the appropriate data into them.
*/
retcfi = kmalloc_flex(*retcfi, chips, cfi.numchips, GFP_KERNEL);
retcfi = kmalloc_flex(*retcfi, chips, cfi.numchips);
if (!retcfi) {
kfree(cfi.cfiq);

View File

@@ -764,7 +764,7 @@ static int intel_dg_mtd_probe(struct auxiliary_device *aux_dev,
return -ENODEV;
}
nvm = kzalloc_flex(*nvm, regions, nregions, GFP_KERNEL);
nvm = kzalloc_flex(*nvm, regions, nregions);
if (!nvm)
return -ENOMEM;

View File

@@ -167,7 +167,7 @@ static struct lpddr_private *lpddr_probe_chip(struct map_info *map)
lpddr.numchips = 1;
numvirtchips = lpddr.numchips * lpddr.qinfo->HWPartsNum;
retlpddr = kzalloc_flex(*retlpddr, chips, numvirtchips, GFP_KERNEL);
retlpddr = kzalloc_flex(*retlpddr, chips, numvirtchips);
if (!retlpddr)
return NULL;

View File

@@ -170,7 +170,7 @@ static struct sa_info *sa1100_setup_mtd(struct platform_device *pdev,
/*
* Allocate the map_info structs in one go.
*/
info = kzalloc_flex(*info, subdev, nr, GFP_KERNEL);
info = kzalloc_flex(*info, subdev, nr);
if (!info) {
ret = -ENOMEM;
goto out;