Re: [PATCH 02/11] touchscreen: ad7877: Use octal permissions

From
Joe Perches <joe@perches.com>
Date
2018-07-22 08:29:30
Also in
lkml
Reply to
dev-harsh1998, 2018-07-21
On Sun, 2018-07-22 at 00:39 +0530, dev-harsh1998 wrote:
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL);
[]
quoted hunk ↗ jump to hunk
diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c
[]
quoted hunk ↗ jump to hunk
@@ -461,7 +461,7 @@ name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \
 		return v; \
 	return sprintf(buf, "%u\n", (unsigned) v); \
 } \
-static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL);
+static DEVICE_ATTR(name, 0444, name ## _show, NULL);
I believe this could be

static DEVICE_ATTR_RO(name)
Thread (14 messages) 14 messages, 4 authors, last reply 2018-07-23
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help