linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: accel: Replace symbolic permissions with octal permissions
@ 2020-06-13  8:19 Mugilraj D
  2020-06-14 13:27 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Mugilraj D @ 2020-06-13  8:19 UTC (permalink / raw)
  Cc: Mugilraj D, Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Linus Walleij, Jonathan Bakker, linux-iio,
	linux-kernel

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

Signed-off-by: Mugilraj D <dmugil2000@gmail.com>
---
 drivers/iio/accel/bma180.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c
index 265722e..b716347 100644
--- a/drivers/iio/accel/bma180.c
+++ b/drivers/iio/accel/bma180.c
@@ -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,
 };
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-14 13:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-13  8:19 [PATCH] iio: accel: Replace symbolic permissions with octal permissions Mugilraj D
2020-06-14 13:27 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).