Skip to contentSkip to conversation

iio: accel: Replace symbolic permissions with octal permissions

PATCH In review Mugilraj D 2 participants 2 messages Jun 13, 2020 – Jun 14, 2020 IIO

lore
Share & tools
lore

Mugilraj D

author
#0 lore raw

PATCH 1/1 iio: accel: Replace symbolic permissions with octal permissions

Resolve following checkpatch issue:
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.

---
 drivers/iio/accel/bma180.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/iio/accel/bma180.c +3 -4
index 265722e..b716347 100644
@@ -531,14 +531,13 @@ static ssize_t bma180_show_scale_avail(struct device *dev,
 }
 
 static IIO_DEVICE_ATTR(in_accel_filter_low_pass_3db_frequency_available,
-	S_IRUGO, bma180_show_filter_freq_avail, NULL, 0);
+	0444, bma180_show_filter_freq_avail, NULL, 0);
 
 static IIO_DEVICE_ATTR(in_accel_scale_available,
-	S_IRUGO, bma180_show_scale_avail, NULL, 0);
+	0444, bma180_show_scale_avail, NULL, 0);
 
 static struct attribute *bma180_attributes[] = {
-	&iio_dev_attr_in_accel_filter_low_pass_3db_frequency_available.
-		dev_attr.attr,
+	&iio_dev_attr_in_accel_filter_low_pass_3db_frequency_available.dev_attr.attr,
 	&iio_dev_attr_in_accel_scale_available.dev_attr.attr,
 	NULL,
 };
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 3 lines · On Sat, 13 Jun 2020 13:49:01 +0530 Mugilraj D <[email protected]> wrote:

Resolve following checkpatch issue:
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.

Hmm. I guess that's just about worth tidying up, but (see inline...)

Take into account that any change does have an impact on maintainability of a driver, and generally no one will take white space changes to drivers outside staging unless there is a good reason.

Jonathan

Quoted 15 lines
---
 drivers/iio/accel/bma180.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/iio/accel/bma180.c +0 -1
index 265722e..b716347 100644
@@ -531,14 +531,13 @@ static ssize_t bma180_show_scale_avail(struct device *dev,
 }
 
 static IIO_DEVICE_ATTR(in_accel_filter_low_pass_3db_frequency_available,
-	S_IRUGO, bma180_show_filter_freq_avail, NULL, 0);

drivers/iio/accel/bma180.c static ssize_t bma180_show_scale_avail(struct device *dev, · line 540

Quoted 10 lines
drivers/iio/accel/bma180.c +3 -3
+	0444, bma180_show_filter_freq_avail, NULL, 0);
 
 static IIO_DEVICE_ATTR(in_accel_scale_available,
-	S_IRUGO, bma180_show_scale_avail, NULL, 0);
+	0444, bma180_show_scale_avail, NULL, 0);
 
 static struct attribute *bma180_attributes[] = {
-	&iio_dev_attr_in_accel_filter_low_pass_3db_frequency_available.
-		dev_attr.attr,
+	&iio_dev_attr_in_accel_filter_low_pass_3db_frequency_available.dev_attr.attr,

This change is unrelated and basically just noise.

Quoted 3 lines
drivers/iio/accel/bma180.c +0 -0
 	&iio_dev_attr_in_accel_scale_available.dev_attr.attr,
 	NULL,
 };