summaryrefslogtreecommitdiff
path: root/drivers/edac
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/edac
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
downloadlinux-next-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz
linux-next-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.zip
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/edac')
-rw-r--r--drivers/edac/amd64_edac.c12
-rw-r--r--drivers/edac/edac_device.c6
-rw-r--r--drivers/edac/edac_mc.c14
-rw-r--r--drivers/edac/edac_mc_sysfs.c2
-rw-r--r--drivers/edac/edac_pci.c2
-rw-r--r--drivers/edac/edac_pci_sysfs.c2
-rw-r--r--drivers/edac/i7core_edac.c4
-rw-r--r--drivers/edac/igen6_edac.c2
-rw-r--r--drivers/edac/imh_base.c2
-rw-r--r--drivers/edac/sb_edac.c2
-rw-r--r--drivers/edac/versalnet_edac.c4
11 files changed, 26 insertions, 26 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 183357b9f99a..8908ab881c85 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -3485,7 +3485,7 @@ static int dct_hw_info_get(struct amd64_pvt *pvt)
static int umc_hw_info_get(struct amd64_pvt *pvt)
{
- pvt->umc = kzalloc_objs(struct amd64_umc, pvt->max_mcs, GFP_KERNEL);
+ pvt->umc = kzalloc_objs(struct amd64_umc, pvt->max_mcs);
if (!pvt->umc)
return -ENOMEM;
@@ -3716,7 +3716,7 @@ static int gpu_hw_info_get(struct amd64_pvt *pvt)
if (ret)
return ret;
- pvt->umc = kzalloc_objs(struct amd64_umc, pvt->max_mcs, GFP_KERNEL);
+ pvt->umc = kzalloc_objs(struct amd64_umc, pvt->max_mcs);
if (!pvt->umc)
return -ENOMEM;
@@ -3916,7 +3916,7 @@ static int per_family_init(struct amd64_pvt *pvt)
scnprintf(pvt->ctl_name, sizeof(pvt->ctl_name), "F%02Xh_M%02Xh",
pvt->fam, pvt->model);
- pvt->csels = kzalloc_objs(*pvt->csels, pvt->max_mcs, GFP_KERNEL);
+ pvt->csels = kzalloc_objs(*pvt->csels, pvt->max_mcs);
if (!pvt->csels)
return -ENOMEM;
@@ -4000,13 +4000,13 @@ static int probe_one_instance(unsigned int nid)
int ret;
ret = -ENOMEM;
- s = kzalloc_obj(struct ecc_settings, GFP_KERNEL);
+ s = kzalloc_obj(struct ecc_settings);
if (!s)
goto err_out;
ecc_stngs[nid] = s;
- pvt = kzalloc_obj(struct amd64_pvt, GFP_KERNEL);
+ pvt = kzalloc_obj(struct amd64_pvt);
if (!pvt)
goto err_settings;
@@ -4146,7 +4146,7 @@ static int __init amd64_edac_init(void)
opstate_init();
err = -ENOMEM;
- ecc_stngs = kzalloc_objs(ecc_stngs[0], amd_nb_num(), GFP_KERNEL);
+ ecc_stngs = kzalloc_objs(ecc_stngs[0], amd_nb_num());
if (!ecc_stngs)
goto err_free;
diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c
index 6bb6e4d435a4..4ff421b518ce 100644
--- a/drivers/edac/edac_device.c
+++ b/drivers/edac/edac_device.c
@@ -67,7 +67,7 @@ edac_device_alloc_ctl_info(unsigned pvt_sz, char *dev_name, unsigned nr_instance
edac_dbg(4, "instances=%d blocks=%d\n", nr_instances, nr_blocks);
- dev_ctl = kzalloc_obj(struct edac_device_ctl_info, GFP_KERNEL);
+ dev_ctl = kzalloc_obj(struct edac_device_ctl_info);
if (!dev_ctl)
return NULL;
@@ -644,7 +644,7 @@ int edac_dev_register(struct device *parent, char *name,
}
}
- ctx = kzalloc_obj(*ctx, GFP_KERNEL);
+ ctx = kzalloc_obj(*ctx);
if (!ctx)
return -ENOMEM;
@@ -654,7 +654,7 @@ int edac_dev_register(struct device *parent, char *name,
goto ctx_free;
if (scrub_cnt) {
- ctx->scrub = kzalloc_objs(*ctx->scrub, scrub_cnt, GFP_KERNEL);
+ ctx->scrub = kzalloc_objs(*ctx->scrub, scrub_cnt);
if (!ctx->scrub)
goto groups_free;
}
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 2d74438837f4..47bd26f5086a 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -216,14 +216,14 @@ static int edac_mc_alloc_csrows(struct mem_ctl_info *mci)
/*
* Allocate and fill the csrow/channels structs
*/
- mci->csrows = kzalloc_objs(*mci->csrows, tot_csrows, GFP_KERNEL);
+ mci->csrows = kzalloc_objs(*mci->csrows, tot_csrows);
if (!mci->csrows)
return -ENOMEM;
for (row = 0; row < tot_csrows; row++) {
struct csrow_info *csr;
- csr = kzalloc_obj(**mci->csrows, GFP_KERNEL);
+ csr = kzalloc_obj(**mci->csrows);
if (!csr)
return -ENOMEM;
@@ -239,7 +239,7 @@ static int edac_mc_alloc_csrows(struct mem_ctl_info *mci)
for (chn = 0; chn < tot_channels; chn++) {
struct rank_info *chan;
- chan = kzalloc_obj(**csr->channels, GFP_KERNEL);
+ chan = kzalloc_obj(**csr->channels);
if (!chan)
return -ENOMEM;
@@ -262,7 +262,7 @@ static int edac_mc_alloc_dimms(struct mem_ctl_info *mci)
/*
* Allocate and fill the dimm structs
*/
- mci->dimms = kzalloc_objs(*mci->dimms, mci->tot_dimms, GFP_KERNEL);
+ mci->dimms = kzalloc_objs(*mci->dimms, mci->tot_dimms);
if (!mci->dimms)
return -ENOMEM;
@@ -276,7 +276,7 @@ static int edac_mc_alloc_dimms(struct mem_ctl_info *mci)
chan = mci->csrows[row]->channels[chn];
- dimm = kzalloc_obj(**mci->dimms, GFP_KERNEL);
+ dimm = kzalloc_obj(**mci->dimms);
if (!dimm)
return -ENOMEM;
mci->dimms[idx] = dimm;
@@ -362,11 +362,11 @@ struct mem_ctl_info *edac_mc_alloc(unsigned int mc_num,
per_rank = true;
}
- mci = kzalloc_obj(struct mem_ctl_info, GFP_KERNEL);
+ mci = kzalloc_obj(struct mem_ctl_info);
if (!mci)
return NULL;
- mci->layers = kzalloc_objs(struct edac_mc_layer, n_layers, GFP_KERNEL);
+ mci->layers = kzalloc_objs(struct edac_mc_layer, n_layers);
if (!mci->layers)
goto error;
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
index 629158cd505c..c2ed6c696e54 100644
--- a/drivers/edac/edac_mc_sysfs.c
+++ b/drivers/edac/edac_mc_sysfs.c
@@ -648,7 +648,7 @@ int __init edac_mc_sysfs_init(void)
{
int err;
- mci_pdev = kzalloc_obj(*mci_pdev, GFP_KERNEL);
+ mci_pdev = kzalloc_obj(*mci_pdev);
if (!mci_pdev)
return -ENOMEM;
diff --git a/drivers/edac/edac_pci.c b/drivers/edac/edac_pci.c
index c1c9dc6ffa2f..327994a95073 100644
--- a/drivers/edac/edac_pci.c
+++ b/drivers/edac/edac_pci.c
@@ -32,7 +32,7 @@ struct edac_pci_ctl_info *edac_pci_alloc_ctl_info(unsigned int sz_pvt,
edac_dbg(1, "\n");
- pci = kzalloc_obj(struct edac_pci_ctl_info, GFP_KERNEL);
+ pci = kzalloc_obj(struct edac_pci_ctl_info);
if (!pci)
return NULL;
diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c
index f1b0f3ba7f72..446fef0a9399 100644
--- a/drivers/edac/edac_pci_sysfs.c
+++ b/drivers/edac/edac_pci_sysfs.c
@@ -361,7 +361,7 @@ static int edac_pci_main_kobj_setup(void)
goto decrement_count_fail;
}
- edac_pci_top_main_kobj = kzalloc_obj(struct kobject, GFP_KERNEL);
+ edac_pci_top_main_kobj = kzalloc_obj(struct kobject);
if (!edac_pci_top_main_kobj) {
edac_dbg(1, "Failed to allocate\n");
err = -ENOMEM;
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index dd1a5e575230..5a8cd90b39a7 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -455,7 +455,7 @@ static struct i7core_dev *alloc_i7core_dev(u8 socket,
{
struct i7core_dev *i7core_dev;
- i7core_dev = kzalloc_obj(*i7core_dev, GFP_KERNEL);
+ i7core_dev = kzalloc_obj(*i7core_dev);
if (!i7core_dev)
return NULL;
@@ -1159,7 +1159,7 @@ static int i7core_create_sysfs_devices(struct mem_ctl_info *mci)
struct i7core_pvt *pvt = mci->pvt_info;
int rc;
- pvt->addrmatch_dev = kzalloc_obj(*pvt->addrmatch_dev, GFP_KERNEL);
+ pvt->addrmatch_dev = kzalloc_obj(*pvt->addrmatch_dev);
if (!pvt->addrmatch_dev)
return -ENOMEM;
diff --git a/drivers/edac/igen6_edac.c b/drivers/edac/igen6_edac.c
index fa1cabfe6909..fcb8ab44cba5 100644
--- a/drivers/edac/igen6_edac.c
+++ b/drivers/edac/igen6_edac.c
@@ -1549,7 +1549,7 @@ static int igen6_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
edac_dbg(2, "\n");
- igen6_pvt = kzalloc_obj(*igen6_pvt, GFP_KERNEL);
+ igen6_pvt = kzalloc_obj(*igen6_pvt);
if (!igen6_pvt)
return -ENOMEM;
diff --git a/drivers/edac/imh_base.c b/drivers/edac/imh_base.c
index a37be2372764..722573a2729a 100644
--- a/drivers/edac/imh_base.c
+++ b/drivers/edac/imh_base.c
@@ -171,7 +171,7 @@ static int __get_ddr_munits(struct res_config *cfg, struct skx_dev *d,
d->imc[lmc].lmc = lmc;
/* Create the imc device instance. */
- dev = kzalloc_obj(*dev, GFP_KERNEL);
+ dev = kzalloc_obj(*dev);
if (!dev)
return -ENOMEM;
diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index 79fc3ace6a10..fc434739b3c3 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -771,7 +771,7 @@ static struct sbridge_dev *alloc_sbridge_dev(int seg, u8 bus, enum domain dom,
{
struct sbridge_dev *sbridge_dev;
- sbridge_dev = kzalloc_obj(*sbridge_dev, GFP_KERNEL);
+ sbridge_dev = kzalloc_obj(*sbridge_dev);
if (!sbridge_dev)
return NULL;
diff --git a/drivers/edac/versalnet_edac.c b/drivers/edac/versalnet_edac.c
index 3cc885fa384c..2cbc13d9bd00 100644
--- a/drivers/edac/versalnet_edac.c
+++ b/drivers/edac/versalnet_edac.c
@@ -559,7 +559,7 @@ static int setup_mcdi(struct mc_priv *mc_priv)
struct cdx_mcdi *amd_mcdi;
int ret, i;
- amd_mcdi = kzalloc_obj(*amd_mcdi, GFP_KERNEL);
+ amd_mcdi = kzalloc_obj(*amd_mcdi);
if (!amd_mcdi)
return -ENOMEM;
@@ -812,7 +812,7 @@ static int init_versalnet(struct mc_priv *priv, struct platform_device *pdev)
priv->mci[i] = mci;
priv->dwidth = dt;
- dev = kzalloc_obj(*dev, GFP_KERNEL);
+ dev = kzalloc_obj(*dev);
dev->release = versal_edac_release;
name = kmalloc(32, GFP_KERNEL);
sprintf(name, "versal-net-ddrmc5-edac-%d", i);