diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 16:37:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 17:09:51 -0800 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/mtd/chips | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (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 'drivers/mtd/chips')
| -rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0001.c | 2 | ||||
| -rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0002.c | 4 | ||||
| -rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0020.c | 2 | ||||
| -rw-r--r-- | drivers/mtd/chips/map_absent.c | 2 | ||||
| -rw-r--r-- | drivers/mtd/chips/map_ram.c | 2 | ||||
| -rw-r--r-- | drivers/mtd/chips/map_rom.c | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index 9a54e390cd44..277a03924b2f 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c @@ -501,7 +501,7 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary) struct mtd_info *mtd; int i; - mtd = kzalloc_obj(*mtd, GFP_KERNEL); + mtd = kzalloc_obj(*mtd); if (!mtd) return NULL; mtd->priv = map; diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index efb3ba02432e..63294a99d8fc 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -604,7 +604,7 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) struct mtd_info *mtd; int i; - mtd = kzalloc_obj(*mtd, GFP_KERNEL); + mtd = kzalloc_obj(*mtd); if (!mtd) return NULL; mtd->priv = map; @@ -2818,7 +2818,7 @@ static int __maybe_unused cfi_ppb_unlock(struct mtd_info *mtd, loff_t ofs, for (i = 0; i < mtd->numeraseregions; i++) max_sectors += regions[i].numblocks; - sect = kzalloc_objs(struct ppb_lock, max_sectors, GFP_KERNEL); + sect = kzalloc_objs(struct ppb_lock, max_sectors); if (!sect) return -ENOMEM; diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c index 5665d3b72da1..a0e7d8a960c5 100644 --- a/drivers/mtd/chips/cfi_cmdset_0020.c +++ b/drivers/mtd/chips/cfi_cmdset_0020.c @@ -172,7 +172,7 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map) int i,j; unsigned long devsize = (1<<cfi->cfiq->DevSize) * cfi->interleave; - mtd = kzalloc_obj(*mtd, GFP_KERNEL); + mtd = kzalloc_obj(*mtd); //printk(KERN_DEBUG "number of CFI chips: %d\n", cfi->numchips); if (!mtd) { diff --git a/drivers/mtd/chips/map_absent.c b/drivers/mtd/chips/map_absent.c index 6a9bd84a6def..1804a44b3eab 100644 --- a/drivers/mtd/chips/map_absent.c +++ b/drivers/mtd/chips/map_absent.c @@ -46,7 +46,7 @@ static struct mtd_info *map_absent_probe(struct map_info *map) { struct mtd_info *mtd; - mtd = kzalloc_obj(*mtd, GFP_KERNEL); + mtd = kzalloc_obj(*mtd); if (!mtd) { return NULL; } diff --git a/drivers/mtd/chips/map_ram.c b/drivers/mtd/chips/map_ram.c index f94d20672423..2dde70e742c5 100644 --- a/drivers/mtd/chips/map_ram.c +++ b/drivers/mtd/chips/map_ram.c @@ -57,7 +57,7 @@ static struct mtd_info *map_ram_probe(struct map_info *map) #endif /* OK. It seems to be RAM. */ - mtd = kzalloc_obj(*mtd, GFP_KERNEL); + mtd = kzalloc_obj(*mtd); if (!mtd) return NULL; diff --git a/drivers/mtd/chips/map_rom.c b/drivers/mtd/chips/map_rom.c index 644ef8d62cc8..dbc34e886b57 100644 --- a/drivers/mtd/chips/map_rom.c +++ b/drivers/mtd/chips/map_rom.c @@ -45,7 +45,7 @@ static struct mtd_info *map_rom_probe(struct map_info *map) { struct mtd_info *mtd; - mtd = kzalloc_obj(*mtd, GFP_KERNEL); + mtd = kzalloc_obj(*mtd); if (!mtd) return NULL; |
