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/thermal/intel | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
| download | linux-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/thermal/intel')
7 files changed, 11 insertions, 11 deletions
diff --git a/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c b/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c index d1876e76167a..0a548fdc4a7e 100644 --- a/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c +++ b/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c @@ -89,7 +89,7 @@ int acpi_parse_trt(acpi_handle handle, int *trt_count, struct trt **trtp, } *trt_count = p->package.count; - trts = kzalloc_objs(struct trt, *trt_count, GFP_KERNEL); + trts = kzalloc_objs(struct trt, *trt_count); if (!trts) { result = -ENOMEM; goto end; @@ -165,7 +165,7 @@ int acpi_parse_art(acpi_handle handle, int *art_count, struct art **artp, /* ignore p->package.elements[0], as this is _ART Revision field */ *art_count = p->package.count - 1; - arts = kzalloc_objs(struct art, *art_count, GFP_KERNEL); + arts = kzalloc_objs(struct art, *art_count); if (!arts) { result = -ENOMEM; goto end; @@ -253,7 +253,7 @@ static int acpi_parse_psvt(acpi_handle handle, int *psvt_count, struct psvt **ps goto end; } - psvts = kzalloc_objs(*psvts, *psvt_count, GFP_KERNEL); + psvts = kzalloc_objs(*psvts, *psvt_count); if (!psvts) { result = -ENOMEM; goto end; diff --git a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c index 3a97718e2f5c..6742eaf0a447 100644 --- a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c @@ -382,7 +382,7 @@ static int evaluate_odvp(struct int3400_thermal_priv *priv) if (priv->odvp == NULL) { priv->odvp_count = obj->package.count; - priv->odvp = kmalloc_objs(int, priv->odvp_count, GFP_KERNEL); + priv->odvp = kmalloc_objs(int, priv->odvp_count); if (!priv->odvp) { ret = -ENOMEM; goto out_err; @@ -561,7 +561,7 @@ static int int3400_thermal_probe(struct platform_device *pdev) if (!adev) return -ENODEV; - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) return -ENOMEM; diff --git a/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c index 7db8fd86c4fd..4c8888fb0a8b 100644 --- a/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c +++ b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c @@ -123,7 +123,7 @@ struct int34x_thermal_zone *int340x_thermal_zone_add(struct acpi_device *adev, acpi_status status; int i, ret; - int34x_zone = kzalloc_obj(*int34x_zone, GFP_KERNEL); + int34x_zone = kzalloc_obj(*int34x_zone); if (!int34x_zone) return ERR_PTR(-ENOMEM); diff --git a/drivers/thermal/intel/intel_hfi.c b/drivers/thermal/intel/intel_hfi.c index 5100ad1336ed..35df0fd5562f 100644 --- a/drivers/thermal/intel/intel_hfi.c +++ b/drivers/thermal/intel/intel_hfi.c @@ -212,7 +212,7 @@ static void update_capabilities(struct hfi_instance *hfi_instance) if (!cpu_count) goto out; - cpu_caps = kzalloc_objs(*cpu_caps, cpu_count, GFP_KERNEL); + cpu_caps = kzalloc_objs(*cpu_caps, cpu_count); if (!cpu_caps) goto out; diff --git a/drivers/thermal/intel/intel_quark_dts_thermal.c b/drivers/thermal/intel/intel_quark_dts_thermal.c index 38a0ae14b69d..15476699bdda 100644 --- a/drivers/thermal/intel/intel_quark_dts_thermal.c +++ b/drivers/thermal/intel/intel_quark_dts_thermal.c @@ -336,7 +336,7 @@ static struct soc_sensor_entry *alloc_soc_dts(void) int err; u32 out; - aux_entry = kzalloc_obj(*aux_entry, GFP_KERNEL); + aux_entry = kzalloc_obj(*aux_entry); if (!aux_entry) { err = -ENOMEM; return ERR_PTR(-ENOMEM); diff --git a/drivers/thermal/intel/intel_soc_dts_iosf.c b/drivers/thermal/intel/intel_soc_dts_iosf.c index 78123107ac06..93773878398e 100644 --- a/drivers/thermal/intel/intel_soc_dts_iosf.c +++ b/drivers/thermal/intel/intel_soc_dts_iosf.c @@ -320,7 +320,7 @@ intel_soc_dts_iosf_init(enum intel_soc_dts_interrupt_type intr_type, if (tj_max < 0) return ERR_PTR(tj_max); - sensors = kzalloc_obj(*sensors, GFP_KERNEL); + sensors = kzalloc_obj(*sensors); if (!sensors) return ERR_PTR(-ENOMEM); diff --git a/drivers/thermal/intel/x86_pkg_temp_thermal.c b/drivers/thermal/intel/x86_pkg_temp_thermal.c index 64cc0361d440..540109761f0a 100644 --- a/drivers/thermal/intel/x86_pkg_temp_thermal.c +++ b/drivers/thermal/intel/x86_pkg_temp_thermal.c @@ -335,7 +335,7 @@ static int pkg_temp_thermal_device_add(unsigned int cpu) return tj_max; tj_max *= 1000; - zonedev = kzalloc_obj(*zonedev, GFP_KERNEL); + zonedev = kzalloc_obj(*zonedev); if (!zonedev) return -ENOMEM; @@ -492,7 +492,7 @@ static int __init pkg_temp_thermal_init(void) return -ENODEV; max_id = topology_max_packages() * topology_max_dies_per_package(); - zones = kzalloc_objs(struct zone_device *, max_id, GFP_KERNEL); + zones = kzalloc_objs(struct zone_device *, max_id); if (!zones) return -ENOMEM; |
