thermal: core: fix permissions and cleanup style
PATCH 1/1 thermal: core: fix permissions and cleanup style
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.
--- drivers/thermal/thermal_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/thermal_core.c +1 -1
@@ -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);
Signature · 1 line
2.34.1
Rafael J. Wysocki
maintainerQuoted 4 lines · 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.
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.
Quoted 25 lines
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 <[email protected]>--- drivers/thermal/thermal_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/thermal/thermal_core.c +1
-2@@ -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