summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/mmc
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (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/mmc')
-rw-r--r--drivers/mmc/core/block.c12
-rw-r--r--drivers/mmc/core/bus.c2
-rw-r--r--drivers/mmc/core/mmc_test.c18
-rw-r--r--drivers/mmc/core/sdio_bus.c2
-rw-r--r--drivers/mmc/core/sdio_uart.c2
-rw-r--r--drivers/mmc/host/dw_mmc-rockchip.c2
-rw-r--r--drivers/mmc/host/dw_mmc.c2
-rw-r--r--drivers/mmc/host/mmc_spi.c2
-rw-r--r--drivers/mmc/host/of_mmc_spi.c2
-rw-r--r--drivers/mmc/host/ushc.c6
10 files changed, 25 insertions, 25 deletions
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index b39cd61cea44..05ee76cb0a08 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -422,7 +422,7 @@ static struct mmc_blk_ioc_data *mmc_blk_ioctl_copy_from_user(
struct mmc_blk_ioc_data *idata;
int err;
- idata = kzalloc_obj(*idata, GFP_KERNEL);
+ idata = kzalloc_obj(*idata);
if (!idata) {
err = -ENOMEM;
goto out;
@@ -737,7 +737,7 @@ static int mmc_blk_ioctl_multi_cmd(struct mmc_blk_data *md,
return -EINVAL;
n = num_of_cmds;
- idata = kzalloc_objs(*idata, n, GFP_KERNEL);
+ idata = kzalloc_objs(*idata, n);
if (!idata)
return -ENOMEM;
@@ -2562,7 +2562,7 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,
return ERR_PTR(devidx);
}
- md = kzalloc_obj(*md, GFP_KERNEL);
+ md = kzalloc_obj(*md);
if (!md) {
ret = -ENOMEM;
goto out;
@@ -2794,12 +2794,12 @@ static struct mmc_blk_ioc_data **alloc_idata(struct mmc_rpmb_data *rpmb,
struct mmc_blk_ioc_data **idata;
unsigned int n;
- idata = kzalloc_objs(*idata, cmd_count, GFP_KERNEL);
+ idata = kzalloc_objs(*idata, cmd_count);
if (!idata)
return NULL;
for (n = 0; n < cmd_count; n++) {
- idata[n] = kzalloc_objs(**idata, 1, GFP_KERNEL);
+ idata[n] = kzalloc_objs(**idata, 1);
if (!idata[n]) {
free_idata(idata, n);
return NULL;
@@ -2942,7 +2942,7 @@ static int mmc_blk_alloc_rpmb_part(struct mmc_card *card,
if (devidx < 0)
return devidx;
- rpmb = kzalloc_obj(*rpmb, GFP_KERNEL);
+ rpmb = kzalloc_obj(*rpmb);
if (!rpmb) {
ida_free(&mmc_rpmb_ida, devidx);
return -ENOMEM;
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index 740b082da3e2..be5cf338bdeb 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -279,7 +279,7 @@ struct mmc_card *mmc_alloc_card(struct mmc_host *host, const struct device_type
{
struct mmc_card *card;
- card = kzalloc_obj(struct mmc_card, GFP_KERNEL);
+ card = kzalloc_obj(struct mmc_card);
if (!card)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/mmc/core/mmc_test.c b/drivers/mmc/core/mmc_test.c
index 70cc83a8a1ee..43fdb67d5407 100644
--- a/drivers/mmc/core/mmc_test.c
+++ b/drivers/mmc/core/mmc_test.c
@@ -348,11 +348,11 @@ static struct mmc_test_mem *mmc_test_alloc_mem(unsigned long min_sz,
if (max_segs > max_page_cnt)
max_segs = max_page_cnt;
- mem = kzalloc_obj(*mem, GFP_KERNEL);
+ mem = kzalloc_obj(*mem);
if (!mem)
return NULL;
- mem->arr = kzalloc_objs(*mem->arr, max_segs, GFP_KERNEL);
+ mem->arr = kzalloc_objs(*mem->arr, max_segs);
if (!mem->arr)
goto out_free;
@@ -533,7 +533,7 @@ static void mmc_test_save_transfer_result(struct mmc_test_card *test,
if (!test->gr)
return;
- tr = kmalloc_obj(*tr, GFP_KERNEL);
+ tr = kmalloc_obj(*tr);
if (!tr)
return;
@@ -765,7 +765,7 @@ static void mmc_test_req_reset(struct mmc_test_req *rq)
static struct mmc_test_req *mmc_test_req_alloc(void)
{
- struct mmc_test_req *rq = kmalloc_obj(*rq, GFP_KERNEL);
+ struct mmc_test_req *rq = kmalloc_obj(*rq);
if (rq)
mmc_test_req_reset(rq);
@@ -1570,13 +1570,13 @@ static int mmc_test_area_init(struct mmc_test_card *test, int erase, int fill)
if (!t->mem)
return -ENOMEM;
- t->sg = kmalloc_objs(*t->sg, t->max_segs, GFP_KERNEL);
+ t->sg = kmalloc_objs(*t->sg, t->max_segs);
if (!t->sg) {
ret = -ENOMEM;
goto out_free;
}
- t->sg_areq = kmalloc_objs(*t->sg_areq, t->max_segs, GFP_KERNEL);
+ t->sg_areq = kmalloc_objs(*t->sg_areq, t->max_segs);
if (!t->sg_areq) {
ret = -ENOMEM;
goto out_free;
@@ -2967,7 +2967,7 @@ static void mmc_test_run(struct mmc_test_card *test, int testcase)
}
}
- gr = kzalloc_obj(*gr, GFP_KERNEL);
+ gr = kzalloc_obj(*gr);
if (gr) {
INIT_LIST_HEAD(&gr->tr_lst);
@@ -3099,7 +3099,7 @@ static ssize_t mtf_test_write(struct file *file, const char __user *buf,
if (ret)
return ret;
- test = kzalloc_obj(*test, GFP_KERNEL);
+ test = kzalloc_obj(*test);
if (!test)
return -ENOMEM;
@@ -3188,7 +3188,7 @@ static int __mmc_test_register_dbgfs_file(struct mmc_card *card,
file = debugfs_create_file(name, mode, card->debugfs_root,
card, fops);
- df = kmalloc_obj(*df, GFP_KERNEL);
+ df = kmalloc_obj(*df);
if (!df) {
debugfs_remove(file);
return -ENOMEM;
diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index 060da5c4ea75..4b07098c33c3 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -337,7 +337,7 @@ struct sdio_func *sdio_alloc_func(struct mmc_card *card)
{
struct sdio_func *func;
- func = kzalloc_obj(struct sdio_func, GFP_KERNEL);
+ func = kzalloc_obj(struct sdio_func);
if (!func)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/mmc/core/sdio_uart.c b/drivers/mmc/core/sdio_uart.c
index a37d91347931..7fd5dedf3ac0 100644
--- a/drivers/mmc/core/sdio_uart.c
+++ b/drivers/mmc/core/sdio_uart.c
@@ -1021,7 +1021,7 @@ static int sdio_uart_probe(struct sdio_func *func,
struct sdio_uart_port *port;
int ret;
- port = kzalloc_obj(struct sdio_uart_port, GFP_KERNEL);
+ port = kzalloc_obj(struct sdio_uart_port);
if (!port)
return -ENOMEM;
diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
index 2a2aee4054f7..4e3423a19bdf 100644
--- a/drivers/mmc/host/dw_mmc-rockchip.c
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
@@ -306,7 +306,7 @@ static int dw_mci_rk3288_execute_tuning(struct dw_mci_slot *slot, u32 opcode)
return -EIO;
}
- ranges = kmalloc_objs(*ranges, priv->num_phases / 2 + 1, GFP_KERNEL);
+ ranges = kmalloc_objs(*ranges, priv->num_phases / 2 + 1);
if (!ranges)
return -ENOMEM;
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 1e0c3904cded..07eb9f23b9d6 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -834,7 +834,7 @@ static int dw_mci_edmac_start_dma(struct dw_mci *host,
static int dw_mci_edmac_init(struct dw_mci *host)
{
/* Request external dma channel */
- host->dms = kzalloc_obj(struct dw_mci_dma_slave, GFP_KERNEL);
+ host->dms = kzalloc_obj(struct dw_mci_dma_slave);
if (!host->dms)
return -ENOMEM;
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
index 8ab52b4de02e..b471a7795b4d 100644
--- a/drivers/mmc/host/mmc_spi.c
+++ b/drivers/mmc/host/mmc_spi.c
@@ -1236,7 +1236,7 @@ static int mmc_spi_probe(struct spi_device *spi)
}
/* Preallocate buffers */
- host->data = kmalloc_obj(*host->data, GFP_KERNEL);
+ host->data = kmalloc_obj(*host->data);
if (!host->data)
goto fail_nobuf1;
diff --git a/drivers/mmc/host/of_mmc_spi.c b/drivers/mmc/host/of_mmc_spi.c
index d3137d23533c..8131a1703f28 100644
--- a/drivers/mmc/host/of_mmc_spi.c
+++ b/drivers/mmc/host/of_mmc_spi.c
@@ -57,7 +57,7 @@ struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi)
if (dev->platform_data || !dev_fwnode(dev))
return dev->platform_data;
- oms = kzalloc_obj(*oms, GFP_KERNEL);
+ oms = kzalloc_obj(*oms);
if (!oms)
return NULL;
diff --git a/drivers/mmc/host/ushc.c b/drivers/mmc/host/ushc.c
index 6a4274bac5c0..7e8af5a06ac9 100644
--- a/drivers/mmc/host/ushc.c
+++ b/drivers/mmc/host/ushc.c
@@ -462,7 +462,7 @@ static int ushc_probe(struct usb_interface *intf, const struct usb_device_id *id
ret = -ENOMEM;
goto err;
}
- ushc->int_data = kzalloc_obj(struct ushc_int_data, GFP_KERNEL);
+ ushc->int_data = kzalloc_obj(struct ushc_int_data);
if (ushc->int_data == NULL) {
ret = -ENOMEM;
goto err;
@@ -479,7 +479,7 @@ static int ushc_probe(struct usb_interface *intf, const struct usb_device_id *id
ret = -ENOMEM;
goto err;
}
- ushc->cbw = kzalloc_obj(struct ushc_cbw, GFP_KERNEL);
+ ushc->cbw = kzalloc_obj(struct ushc_cbw);
if (ushc->cbw == NULL) {
ret = -ENOMEM;
goto err;
@@ -501,7 +501,7 @@ static int ushc_probe(struct usb_interface *intf, const struct usb_device_id *id
ret = -ENOMEM;
goto err;
}
- ushc->csw = kzalloc_obj(struct ushc_csw, GFP_KERNEL);
+ ushc->csw = kzalloc_obj(struct ushc_csw);
if (ushc->csw == NULL) {
ret = -ENOMEM;
goto err;