* [PATCH] thermal: core: fix permissions and cleanup style
@ 2026-05-11 17:33 Mayur Kumar
2026-05-11 17:40 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Mayur Kumar @ 2026-05-11 17:33 UTC (permalink / raw)
To: rafael, daniel.lezcano, rui.zhang, lukasz.luba
Cc: linux-pm, linux-kernel, Mayur Kumar
Convert symbolic permissions to octal 0644 in thermal_core.c.
Also, re-align function parameters for for_each_thermal_* helpers
to match kernel coding style.
Note: checkpatch.pl reports an error regarding brace placement
on lines 707, 725, and 743, but these are false positives caused
by the complex function pointer arguments in the definitions.
Signed-off-by: Mayur Kumar <kmayur809@gmail.com>
---
drivers/thermal/thermal_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 2f4e2dc46b8..c44bc084064 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -877,7 +877,7 @@ static int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
"cdev%d_weight", dev->id);
sysfs_attr_init(&dev->weight_attr.attr);
dev->weight_attr.attr.name = dev->weight_attr_name;
- dev->weight_attr.attr.mode = S_IWUSR | S_IRUGO;
+ dev->weight_attr.attr.mode = 0644;
dev->weight_attr.show = weight_show;
dev->weight_attr.store = weight_store;
result = device_create_file(&tz->device, &dev->weight_attr);
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] thermal: core: fix permissions and cleanup style
2026-05-11 17:33 [PATCH] thermal: core: fix permissions and cleanup style Mayur Kumar
@ 2026-05-11 17:40 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2026-05-11 17:40 UTC (permalink / raw)
To: Mayur Kumar
Cc: rafael, daniel.lezcano, rui.zhang, lukasz.luba, linux-pm,
linux-kernel
On Mon, May 11, 2026 at 7:34 PM Mayur Kumar <kmayur809@gmail.com> wrote:
>
> Convert symbolic permissions to octal 0644 in thermal_core.c.
> Also, re-align function parameters for for_each_thermal_* helpers
> to match kernel coding style.
checkpatch.pl is for new code.
Generally speaking, existing code that works need not be "fixed" to
address checkpatch warnings in it.
I'm not going to make this particular change.
> Note: checkpatch.pl reports an error regarding brace placement
> on lines 707, 725, and 743, but these are false positives caused
> by the complex function pointer arguments in the definitions.
>
> Signed-off-by: Mayur Kumar <kmayur809@gmail.com>
> ---
> drivers/thermal/thermal_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
> index 2f4e2dc46b8..c44bc084064 100644
> --- a/drivers/thermal/thermal_core.c
> +++ b/drivers/thermal/thermal_core.c
> @@ -877,7 +877,7 @@ static int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
> "cdev%d_weight", dev->id);
> sysfs_attr_init(&dev->weight_attr.attr);
> dev->weight_attr.attr.name = dev->weight_attr_name;
> - dev->weight_attr.attr.mode = S_IWUSR | S_IRUGO;
> + dev->weight_attr.attr.mode = 0644;
> dev->weight_attr.show = weight_show;
> dev->weight_attr.store = weight_store;
> result = device_create_file(&tz->device, &dev->weight_attr);
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-11 17:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-11 17:33 [PATCH] thermal: core: fix permissions and cleanup style Mayur Kumar
2026-05-11 17:40 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox