summaryrefslogtreecommitdiff
path: root/drivers/hwmon
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/hwmon
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/hwmon')
-rw-r--r--drivers/hwmon/acpi_power_meter.c2
-rw-r--r--drivers/hwmon/applesmc.c4
-rw-r--r--drivers/hwmon/coretemp.c4
-rw-r--r--drivers/hwmon/drivetemp.c2
-rw-r--r--drivers/hwmon/fschmd.c2
-rw-r--r--drivers/hwmon/hwmon.c8
-rw-r--r--drivers/hwmon/i5k_amb.c2
-rw-r--r--drivers/hwmon/ibmaem.c4
-rw-r--r--drivers/hwmon/ibmpex.c2
-rw-r--r--drivers/hwmon/sch56xx-common.c2
-rw-r--r--drivers/hwmon/via-cputemp.c2
-rw-r--r--drivers/hwmon/w83793.c2
12 files changed, 18 insertions, 18 deletions
diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c
index 1fa3657f4630..2da06524bdb3 100644
--- a/drivers/hwmon/acpi_power_meter.c
+++ b/drivers/hwmon/acpi_power_meter.c
@@ -892,7 +892,7 @@ static int acpi_power_meter_add(struct acpi_device *device)
if (!device)
return -EINVAL;
- resource = kzalloc_obj(*resource, GFP_KERNEL);
+ resource = kzalloc_obj(*resource);
if (!resource)
return -ENOMEM;
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index 0dbad1d3808c..24f3e86d0ebf 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -586,7 +586,7 @@ static int applesmc_init_smcreg_try(void)
s->key_count = count;
if (!s->cache)
- s->cache = kzalloc_objs(*s->cache, s->key_count, GFP_KERNEL);
+ s->cache = kzalloc_objs(*s->cache, s->key_count);
if (!s->cache)
return -ENOMEM;
@@ -1141,7 +1141,7 @@ static int applesmc_create_nodes(struct applesmc_node_group *groups, int num)
int ret, i;
for (grp = groups; grp->format; grp++) {
- grp->nodes = kzalloc_objs(*node, num + 1, GFP_KERNEL);
+ grp->nodes = kzalloc_objs(*node, num + 1);
if (!grp->nodes) {
ret = -ENOMEM;
goto out;
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index eb00a9f08955..ad9d5c5702b1 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -498,7 +498,7 @@ init_temp_data(struct platform_data *pdata, unsigned int cpu, int pkg_flag)
return NULL;
}
- tdata = kzalloc_obj(struct temp_data, GFP_KERNEL);
+ tdata = kzalloc_obj(struct temp_data);
if (!tdata)
return NULL;
@@ -625,7 +625,7 @@ static int coretemp_device_add(int zoneid)
int err;
/* Initialize the per-zone data structures */
- pdata = kzalloc_obj(*pdata, GFP_KERNEL);
+ pdata = kzalloc_obj(*pdata);
if (!pdata)
return -ENOMEM;
diff --git a/drivers/hwmon/drivetemp.c b/drivers/hwmon/drivetemp.c
index f2fa7223be7a..002e0660a0b8 100644
--- a/drivers/hwmon/drivetemp.c
+++ b/drivers/hwmon/drivetemp.c
@@ -556,7 +556,7 @@ static int drivetemp_add(struct device *dev)
struct drivetemp_data *st;
int err;
- st = kzalloc_obj(*st, GFP_KERNEL);
+ st = kzalloc_obj(*st);
if (!st)
return -ENOMEM;
diff --git a/drivers/hwmon/fschmd.c b/drivers/hwmon/fschmd.c
index 740d46634b4c..1211fa2259e5 100644
--- a/drivers/hwmon/fschmd.c
+++ b/drivers/hwmon/fschmd.c
@@ -1088,7 +1088,7 @@ static int fschmd_probe(struct i2c_client *client)
int i, err;
enum chips kind = (uintptr_t)i2c_get_match_data(client);
- data = kzalloc_obj(struct fschmd_data, GFP_KERNEL);
+ data = kzalloc_obj(struct fschmd_data);
if (!data)
return -ENOMEM;
diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c
index a1173ea0b029..9695dca62a7e 100644
--- a/drivers/hwmon/hwmon.c
+++ b/drivers/hwmon/hwmon.c
@@ -533,7 +533,7 @@ static struct attribute *hwmon_genattr(const void *drvdata,
if ((mode & 0222) && !ops->write)
return ERR_PTR(-EINVAL);
- hattr = kzalloc_obj(*hattr, GFP_KERNEL);
+ hattr = kzalloc_obj(*hattr);
if (!hattr)
return ERR_PTR(-ENOMEM);
@@ -879,7 +879,7 @@ __hwmon_create_attrs(const void *drvdata, const struct hwmon_chip_info *chip)
if (nattrs == 0)
return ERR_PTR(-EINVAL);
- attrs = kzalloc_objs(*attrs, nattrs + 1, GFP_KERNEL);
+ attrs = kzalloc_objs(*attrs, nattrs + 1);
if (!attrs)
return ERR_PTR(-ENOMEM);
@@ -917,7 +917,7 @@ __hwmon_device_register(struct device *dev, const char *name, void *drvdata,
if (id < 0)
return ERR_PTR(id);
- hwdev = kzalloc_obj(*hwdev, GFP_KERNEL);
+ hwdev = kzalloc_obj(*hwdev);
if (hwdev == NULL) {
err = -ENOMEM;
goto ida_remove;
@@ -933,7 +933,7 @@ __hwmon_device_register(struct device *dev, const char *name, void *drvdata,
for (i = 0; groups[i]; i++)
ngroups++;
- hwdev->groups = kzalloc_objs(*groups, ngroups, GFP_KERNEL);
+ hwdev->groups = kzalloc_objs(*groups, ngroups);
if (!hwdev->groups) {
err = -ENOMEM;
goto free_hwmon;
diff --git a/drivers/hwmon/i5k_amb.c b/drivers/hwmon/i5k_amb.c
index f3835606179c..de486e69e6b8 100644
--- a/drivers/hwmon/i5k_amb.c
+++ b/drivers/hwmon/i5k_amb.c
@@ -494,7 +494,7 @@ static int i5k_amb_probe(struct platform_device *pdev)
struct resource *reso;
int i, res;
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return -ENOMEM;
diff --git a/drivers/hwmon/ibmaem.c b/drivers/hwmon/ibmaem.c
index e62e7bab0865..0a9c3a29e6f2 100644
--- a/drivers/hwmon/ibmaem.c
+++ b/drivers/hwmon/ibmaem.c
@@ -517,7 +517,7 @@ static int aem_init_aem1_inst(struct aem_ipmi_data *probe, u8 module_handle)
int i;
int res = -ENOMEM;
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return res;
mutex_init(&data->lock);
@@ -657,7 +657,7 @@ static int aem_init_aem2_inst(struct aem_ipmi_data *probe,
int i;
int res = -ENOMEM;
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return res;
mutex_init(&data->lock);
diff --git a/drivers/hwmon/ibmpex.c b/drivers/hwmon/ibmpex.c
index 331aa8159ab8..949bc2403b2d 100644
--- a/drivers/hwmon/ibmpex.c
+++ b/drivers/hwmon/ibmpex.c
@@ -438,7 +438,7 @@ static void ibmpex_register_bmc(int iface, struct device *dev)
struct ibmpex_bmc_data *data;
int err;
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return;
diff --git a/drivers/hwmon/sch56xx-common.c b/drivers/hwmon/sch56xx-common.c
index 1b0442fe2bf3..a385aae3bb0f 100644
--- a/drivers/hwmon/sch56xx-common.c
+++ b/drivers/hwmon/sch56xx-common.c
@@ -330,7 +330,7 @@ struct regmap *devm_regmap_init_sch56xx(struct device *dev, struct mutex *lock,
if (config->reg_bits != 16 && config->val_bits != 8)
return ERR_PTR(-EOPNOTSUPP);
- context = kzalloc_obj(*context, GFP_KERNEL);
+ context = kzalloc_obj(*context);
if (!context)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/hwmon/via-cputemp.c b/drivers/hwmon/via-cputemp.c
index 72a4f514a78c..a5c03ed59c1f 100644
--- a/drivers/hwmon/via-cputemp.c
+++ b/drivers/hwmon/via-cputemp.c
@@ -222,7 +222,7 @@ static int via_cputemp_online(unsigned int cpu)
goto exit;
}
- pdev_entry = kzalloc_obj(struct pdev_entry, GFP_KERNEL);
+ pdev_entry = kzalloc_obj(struct pdev_entry);
if (!pdev_entry) {
err = -ENOMEM;
goto exit_device_put;
diff --git a/drivers/hwmon/w83793.c b/drivers/hwmon/w83793.c
index 8081ef3b1592..24772cfbecb3 100644
--- a/drivers/hwmon/w83793.c
+++ b/drivers/hwmon/w83793.c
@@ -1650,7 +1650,7 @@ static int w83793_probe(struct i2c_client *client)
int files_pwm = ARRAY_SIZE(w83793_left_pwm) / 5;
int files_temp = ARRAY_SIZE(w83793_temp) / 6;
- data = kzalloc_obj(struct w83793_data, GFP_KERNEL);
+ data = kzalloc_obj(struct w83793_data);
if (!data) {
err = -ENOMEM;
goto exit;