The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Mayur Kumar <kmayur809@gmail.com>
To: rafael@kernel.org, daniel.lezcano@kernel.org,
	rui.zhang@intel.com, lukasz.luba@arm.com
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Mayur Kumar <kmayur809@gmail.com>
Subject: [PATCH] thermal: sysfs: fix whitespace and use octal permissions
Date: Mon, 11 May 2026 22:07:18 +0530	[thread overview]
Message-ID: <20260511163718.198335-1-kmayur809@gmail.com> (raw)

Clean up thermal_sysfs.c by removing a space before a tab and
replacing symbolic permissions (S_IRUGO, S_IWUSR) with their
preferred octal equivalents (0444, 0200) to improve readability.

Signed-off-by: Mayur Kumar <kmayur809@gmail.com>
---
 drivers/thermal/thermal_sysfs.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
index 5eecae13f07..7cf6b0b060a 100644
--- a/drivers/thermal/thermal_sysfs.c
+++ b/drivers/thermal/thermal_sysfs.c
@@ -82,7 +82,7 @@ mode_store(struct device *dev, struct device_attribute *attr,
 }
 
 #define thermal_trip_of_attr(_ptr_, _attr_)				\
-	({ 								\
+	({\
 		struct thermal_trip_desc *td;				\
 									\
 		td = container_of(_ptr_, struct thermal_trip_desc,	\
@@ -405,7 +405,7 @@ static int create_trip_attrs(struct thermal_zone_device *tz)
 
 		sysfs_attr_init(&trip_attrs->type.attr.attr);
 		trip_attrs->type.attr.attr.name = trip_attrs->type.name;
-		trip_attrs->type.attr.attr.mode = S_IRUGO;
+		trip_attrs->type.attr.attr.mode = 0444;
 		trip_attrs->type.attr.show = trip_point_type_show;
 		attrs[i] = &trip_attrs->type.attr.attr;
 
@@ -415,10 +415,10 @@ static int create_trip_attrs(struct thermal_zone_device *tz)
 
 		sysfs_attr_init(&trip_attrs->temp.attr.attr);
 		trip_attrs->temp.attr.attr.name = trip_attrs->temp.name;
-		trip_attrs->temp.attr.attr.mode = S_IRUGO;
+		trip_attrs->temp.attr.attr.mode = 0444;
 		trip_attrs->temp.attr.show = trip_point_temp_show;
 		if (td->trip.flags & THERMAL_TRIP_FLAG_RW_TEMP) {
-			trip_attrs->temp.attr.attr.mode |= S_IWUSR;
+			trip_attrs->temp.attr.attr.mode |= 0200;
 			trip_attrs->temp.attr.store = trip_point_temp_store;
 		}
 		attrs[i + tz->num_trips] = &trip_attrs->temp.attr.attr;
@@ -428,10 +428,10 @@ static int create_trip_attrs(struct thermal_zone_device *tz)
 
 		sysfs_attr_init(&trip_attrs->hyst.attr.attr);
 		trip_attrs->hyst.attr.attr.name = trip_attrs->hyst.name;
-		trip_attrs->hyst.attr.attr.mode = S_IRUGO;
+		trip_attrs->hyst.attr.attr.mode = 0444;
 		trip_attrs->hyst.attr.show = trip_point_hyst_show;
 		if (td->trip.flags & THERMAL_TRIP_FLAG_RW_HYST) {
-			trip_attrs->hyst.attr.attr.mode |= S_IWUSR;
+			trip_attrs->hyst.attr.attr.mode |= 0200;
 			trip_attrs->hyst.attr.store = trip_point_hyst_store;
 		}
 		attrs[i + 2 * tz->num_trips] = &trip_attrs->hyst.attr.attr;
-- 
2.34.1


             reply	other threads:[~2026-05-11 16:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11 16:37 Mayur Kumar [this message]
2026-05-11 17:42 ` [PATCH] thermal: sysfs: fix whitespace and use octal permissions Rafael J. Wysocki
2026-05-11 17:52   ` [PATCH v2] thermal: sysfs: remove space before tab in macro Mayur Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260511163718.198335-1-kmayur809@gmail.com \
    --to=kmayur809@gmail.com \
    --cc=daniel.lezcano@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox