[PATCH] thermal: core: fix permissions and cleanup style

From: Mayur Kumar

Date: Mon May 11 2026 - 13:50:28 EST


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@xxxxxxxxx>
---
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