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/memstick | |
| 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/memstick')
| -rw-r--r-- | drivers/memstick/core/memstick.c | 2 | ||||
| -rw-r--r-- | drivers/memstick/core/ms_block.c | 6 | ||||
| -rw-r--r-- | drivers/memstick/core/mspro_block.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c index d3641ba53bc9..e03989c4e99e 100644 --- a/drivers/memstick/core/memstick.c +++ b/drivers/memstick/core/memstick.c @@ -380,7 +380,7 @@ EXPORT_SYMBOL(memstick_set_rw_addr); static struct memstick_dev *memstick_alloc_card(struct memstick_host *host) { - struct memstick_dev *card = kzalloc_obj(struct memstick_dev, GFP_KERNEL); + struct memstick_dev *card = kzalloc_obj(struct memstick_dev); struct memstick_dev *old_card = host->card; struct ms_id_register id_reg; diff --git a/drivers/memstick/core/ms_block.c b/drivers/memstick/core/ms_block.c index 6835849bf309..a01fe313558e 100644 --- a/drivers/memstick/core/ms_block.c +++ b/drivers/memstick/core/ms_block.c @@ -1203,7 +1203,7 @@ static int msb_read_boot_blocks(struct msb_data *msb) dbg_verbose("Start of a scan for the boot blocks"); if (!msb->boot_page) { - page = kmalloc_objs(struct ms_boot_page, 2, GFP_KERNEL); + page = kmalloc_objs(struct ms_boot_page, 2); if (!page) return -ENOMEM; @@ -2150,7 +2150,7 @@ static int msb_probe(struct memstick_dev *card) struct msb_data *msb; int rc = 0; - msb = kzalloc_obj(struct msb_data, GFP_KERNEL); + msb = kzalloc_obj(struct msb_data); if (!msb) return -ENOMEM; memstick_set_drvdata(card, msb); @@ -2224,7 +2224,7 @@ static int msb_resume(struct memstick_dev *card) #endif mutex_lock(&card->host->lock); - new_msb = kzalloc_obj(struct msb_data, GFP_KERNEL); + new_msb = kzalloc_obj(struct msb_data); if (!new_msb) goto out; diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/mspro_block.c index 57c2b28f88bd..1cd061bb89d9 100644 --- a/drivers/memstick/core/mspro_block.c +++ b/drivers/memstick/core/mspro_block.c @@ -954,7 +954,7 @@ static int mspro_block_read_attributes(struct memstick_dev *card) } for (cnt = 0; cnt < attr_count; ++cnt) { - s_attr = kzalloc_obj(struct mspro_sys_attr, GFP_KERNEL); + s_attr = kzalloc_obj(struct mspro_sys_attr); if (!s_attr) { rc = -ENOMEM; goto out_free_buffer; @@ -1210,7 +1210,7 @@ static int mspro_block_probe(struct memstick_dev *card) struct mspro_block_data *msb; int rc = 0; - msb = kzalloc_obj(struct mspro_block_data, GFP_KERNEL); + msb = kzalloc_obj(struct mspro_block_data); if (!msb) return -ENOMEM; memstick_set_drvdata(card, msb); @@ -1297,7 +1297,7 @@ static int mspro_block_resume(struct memstick_dev *card) unsigned char cnt; mutex_lock(&host->lock); - new_msb = kzalloc_obj(struct mspro_block_data, GFP_KERNEL); + new_msb = kzalloc_obj(struct mspro_block_data); if (!new_msb) { rc = -ENOMEM; goto out_unlock; |
