lkml.org 
[lkml]   [2018]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 02/11] touchscreen: ad7877: Use octal permissions
From
Date
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);
[]
> diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c
[]
> @@ -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)

\
 
 \ /
  Last update: 2018-07-22 10:30    [W:0.330 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site