linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 02/11] touchscreen: ad7877: Use octal permissions
@ 2018-07-21 19:09 dev-harsh1998
  2018-07-21 19:09 ` [PATCH 03/11] touchscreen: ad7846: " dev-harsh1998
                   ` (10 more replies)
  0 siblings, 11 replies; 15+ messages in thread
From: dev-harsh1998 @ 2018-07-21 19:09 UTC (permalink / raw)
  To: trivial
  Cc: Michael Hennerich, Dmitry Torokhov, Simon Budig, Andi Shyti,
	Luca Ceresoli, linux-input, linux-kernel

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL);

Signed-off-by: dev-harsh1998 <harshitjain6751@gmail.com>
---
 drivers/input/touchscreen/ad7877.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c
index 5cfe477ec992..4b4a9d84195e 100644
--- 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);
 
 SHOW(aux1)
 SHOW(aux2)
-- 
2.17.1


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

* [PATCH 03/11] touchscreen: ad7846: Use octal permissions
  2018-07-21 19:09 [PATCH 02/11] touchscreen: ad7877: Use octal permissions dev-harsh1998
@ 2018-07-21 19:09 ` dev-harsh1998
  2018-07-21 19:09 ` [PATCH 04/11] touchscreen: amtel: " dev-harsh1998
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: dev-harsh1998 @ 2018-07-21 19:09 UTC (permalink / raw)
  To: trivial
  Cc: Dmitry Torokhov, Andi Shyti, Simon Budig, Luca Ceresoli,
	linux-input, linux-kernel

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL);

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(pen_down, S_IRUGO, ads7846_pen_down_show, NULL);

Signed-off-by: dev-harsh1998 <harshitjain6751@gmail.com>
---
 drivers/input/touchscreen/ads7846.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index a2f45aefce08..7c07de0802de 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -431,7 +431,7 @@ name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \
 		return v; \
 	return sprintf(buf, "%u\n", adjust(ts, v)); \
 } \
-static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL);
+static DEVICE_ATTR(name, 0444, name ## _show, NULL);
 
 
 /* Sysfs conventions report temperatures in millidegrees Celsius.
@@ -561,7 +561,7 @@ static ssize_t ads7846_pen_down_show(struct device *dev,
 	return sprintf(buf, "%u\n", ts->pendown);
 }
 
-static DEVICE_ATTR(pen_down, S_IRUGO, ads7846_pen_down_show, NULL);
+static DEVICE_ATTR(pen_down, 0444, ads7846_pen_down_show, NULL);
 
 static ssize_t ads7846_disable_show(struct device *dev,
 				     struct device_attribute *attr, char *buf)
-- 
2.17.1


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

* [PATCH 04/11] touchscreen: amtel: Use octal permissions
  2018-07-21 19:09 [PATCH 02/11] touchscreen: ad7877: Use octal permissions dev-harsh1998
  2018-07-21 19:09 ` [PATCH 03/11] touchscreen: ad7846: " dev-harsh1998
@ 2018-07-21 19:09 ` dev-harsh1998
  2018-07-21 19:09 ` [PATCH 05/11] touchscreen: elants: " dev-harsh1998
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: dev-harsh1998 @ 2018-07-21 19:09 UTC (permalink / raw)
  To: trivial
  Cc: Nick Dyer, Dmitry Torokhov, Simon Budig, Andi Shyti,
	Luca Ceresoli, linux-input, linux-kernel

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(fw_version, S_IRUGO, mxt_fw_version_show, NULL);

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(hw_version, S_IRUGO, mxt_hw_version_show, NULL);

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(object, S_IRUGO, mxt_object_show, NULL);

WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'.
+static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mxt_update_fw_store);

Signed-off-by: dev-harsh1998 <harshitjain6751@gmail.com>
---
 drivers/input/touchscreen/atmel_mxt_ts.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 54fe190fd4bc..5202a8244f1d 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -2892,10 +2892,10 @@ static ssize_t mxt_update_fw_store(struct device *dev,
 	return count;
 }
 
-static DEVICE_ATTR(fw_version, S_IRUGO, mxt_fw_version_show, NULL);
-static DEVICE_ATTR(hw_version, S_IRUGO, mxt_hw_version_show, NULL);
-static DEVICE_ATTR(object, S_IRUGO, mxt_object_show, NULL);
-static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mxt_update_fw_store);
+static DEVICE_ATTR(fw_version, 0444, mxt_fw_version_show, NULL);
+static DEVICE_ATTR(hw_version, 0444, mxt_hw_version_show, NULL);
+static DEVICE_ATTR(object, 0444, mxt_object_show, NULL);
+static DEVICE_ATTR(update_fw, 0200, NULL, mxt_update_fw_store);
 
 static struct attribute *mxt_attrs[] = {
 	&dev_attr_fw_version.attr,
-- 
2.17.1


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

* [PATCH 05/11] touchscreen: elants: Use octal permissions
  2018-07-21 19:09 [PATCH 02/11] touchscreen: ad7877: Use octal permissions dev-harsh1998
  2018-07-21 19:09 ` [PATCH 03/11] touchscreen: ad7846: " dev-harsh1998
  2018-07-21 19:09 ` [PATCH 04/11] touchscreen: amtel: " dev-harsh1998
@ 2018-07-21 19:09 ` dev-harsh1998
  2018-07-22  9:39   ` Greg Kroah-Hartman
  2018-07-21 19:09 ` [PATCH 06/11] touchscreen: ili210x: " dev-harsh1998
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 15+ messages in thread
From: dev-harsh1998 @ 2018-07-21 19:09 UTC (permalink / raw)
  To: trivial
  Cc: Dmitry Torokhov, Andi Shyti, Simon Budig, Luca Ceresoli,
	Greg Kroah-Hartman, Guenter Roeck, Joe Perches, linux-input,
	linux-kernel

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(iap_mode, S_IRUGO, show_iap_mode, NULL);

WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'.
+static DEVICE_ATTR(update_fw, S_IWUSR, NULL, write_update_fw)

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+		.dattr = __ATTR(_field, S_IRUGO,			\

Signed-off-by: dev-harsh1998 <harshitjain6751@gmail.com>
---
 drivers/input/touchscreen/elants_i2c.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
index d21ca39b0fdb..9717b7c3bb6f 100644
--- a/drivers/input/touchscreen/elants_i2c.c
+++ b/drivers/input/touchscreen/elants_i2c.c
@@ -1000,8 +1000,8 @@ static ssize_t show_iap_mode(struct device *dev,
 }
 
 static DEVICE_ATTR_WO(calibrate);
-static DEVICE_ATTR(iap_mode, S_IRUGO, show_iap_mode, NULL);
-static DEVICE_ATTR(update_fw, S_IWUSR, NULL, write_update_fw);
+static DEVICE_ATTR(iap_mode, 0444, show_iap_mode, NULL);
+static DEVICE_ATTR(update_fw, 0200, NULL, write_update_fw);
 
 struct elants_version_attribute {
 	struct device_attribute dattr;
@@ -1016,7 +1016,7 @@ struct elants_version_attribute {
 	 __ELANTS_FIELD_SIZE(_field))
 #define ELANTS_VERSION_ATTR(_field)					\
 	struct elants_version_attribute elants_ver_attr_##_field = {	\
-		.dattr = __ATTR(_field, S_IRUGO,			\
+		.dattr = __ATTR(_field, 0444,			\
 				elants_version_attribute_show, NULL),	\
 		.field_offset = offsetof(struct elants_data, _field),	\
 		.field_size = __ELANTS_VERIFY_SIZE(_field),		\
-- 
2.17.1


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

* [PATCH 06/11] touchscreen: ili210x: Use octal permissions
  2018-07-21 19:09 [PATCH 02/11] touchscreen: ad7877: Use octal permissions dev-harsh1998
                   ` (2 preceding siblings ...)
  2018-07-21 19:09 ` [PATCH 05/11] touchscreen: elants: " dev-harsh1998
@ 2018-07-21 19:09 ` dev-harsh1998
  2018-07-21 19:09 ` [PATCH 07/11] touchscreen: mc13783: " dev-harsh1998
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: dev-harsh1998 @ 2018-07-21 19:09 UTC (permalink / raw)
  To: trivial
  Cc: Dmitry Torokhov, Simon Budig, Andi Shyti, Luca Ceresoli,
	linux-input, linux-kernel

WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'.
+static DEVICE_ATTR(calibrate, S_IWUSR, NULL, ili210x_calibrate);

Signed-off-by: dev-harsh1998 <harshitjain6751@gmail.com>
---
 drivers/input/touchscreen/ili210x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/ili210x.c b/drivers/input/touchscreen/ili210x.c
index 6f76eeedf465..07526a6f2cb7 100644
--- a/drivers/input/touchscreen/ili210x.c
+++ b/drivers/input/touchscreen/ili210x.c
@@ -169,7 +169,7 @@ static ssize_t ili210x_calibrate(struct device *dev,
 
 	return count;
 }
-static DEVICE_ATTR(calibrate, S_IWUSR, NULL, ili210x_calibrate);
+static DEVICE_ATTR(calibrate, 0200, NULL, ili210x_calibrate);
 
 static struct attribute *ili210x_attributes[] = {
 	&dev_attr_calibrate.attr,
-- 
2.17.1


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

* [PATCH 07/11] touchscreen: mc13783: Use octal permissions
  2018-07-21 19:09 [PATCH 02/11] touchscreen: ad7877: Use octal permissions dev-harsh1998
                   ` (3 preceding siblings ...)
  2018-07-21 19:09 ` [PATCH 06/11] touchscreen: ili210x: " dev-harsh1998
@ 2018-07-21 19:09 ` dev-harsh1998
  2018-07-21 19:09 ` [PATCH 08/11] touchscreen: melfas: " dev-harsh1998
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: dev-harsh1998 @ 2018-07-21 19:09 UTC (permalink / raw)
  To: trivial
  Cc: Dmitry Torokhov, Andi Shyti, Simon Budig, Luca Ceresoli,
	linux-input, linux-kernel

WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred. Consider using octal permissions '0644'.
+module_param(sample_tolerance, uint, S_IRUGO | S_IWUSR);

Signed-off-by: dev-harsh1998 <harshitjain6751@gmail.com>
---
 drivers/input/touchscreen/mc13783_ts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/mc13783_ts.c b/drivers/input/touchscreen/mc13783_ts.c
index ef64f36c5ffc..4e33349f101e 100644
--- a/drivers/input/touchscreen/mc13783_ts.c
+++ b/drivers/input/touchscreen/mc13783_ts.c
@@ -25,9 +25,9 @@
 #define DEFAULT_SAMPLE_TOLERANCE 300
 
 static unsigned int sample_tolerance = DEFAULT_SAMPLE_TOLERANCE;
-module_param(sample_tolerance, uint, S_IRUGO | S_IWUSR);
+module_param(sample_tolerance, uint, 0644);
 MODULE_PARM_DESC(sample_tolerance,
-		"If the minimal and maximal value read out for one axis (out "
+		"If the minimal and maximum value read out for one axis (out "
 		"of three) differ by this value (default: "
 		__stringify(DEFAULT_SAMPLE_TOLERANCE) ") or more, the reading "
 		"is supposed to be wrong and is discarded.  Set to 0 to "
-- 
2.17.1


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

* [PATCH 08/11] touchscreen: melfas: Use octal permissions
  2018-07-21 19:09 [PATCH 02/11] touchscreen: ad7877: Use octal permissions dev-harsh1998
                   ` (4 preceding siblings ...)
  2018-07-21 19:09 ` [PATCH 07/11] touchscreen: mc13783: " dev-harsh1998
@ 2018-07-21 19:09 ` dev-harsh1998
  2018-07-21 19:09 ` [PATCH 09/11] touchscreen: raydium_ts: " dev-harsh1998
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: dev-harsh1998 @ 2018-07-21 19:09 UTC (permalink / raw)
  To: trivial
  Cc: Dmitry Torokhov, Sangwon Jee, Simon Budig, Andi Shyti,
	Luca Ceresoli, linux-input, linux-kernel

WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'.
+static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mip4_sysfs_fw_update);

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(fw_version, S_IRUGO, mip4_sysfs_read_fw_version, NULL);

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(hw_version, S_IRUGO, mip4_sysfs_read_hw_version, NULL);

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(product_id, S_IRUGO, mip4_sysfs_read_product_id, NULL);

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(ic_name, S_IRUGO, mip4_sysfs_read_ic_name, NULL);

Signed-off-by: dev-harsh1998 <harshitjain6751@gmail.com>
---
 drivers/input/touchscreen/melfas_mip4.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/input/touchscreen/melfas_mip4.c b/drivers/input/touchscreen/melfas_mip4.c
index 430a2bc5f7ca..f7fd940e61ea 100644
--- a/drivers/input/touchscreen/melfas_mip4.c
+++ b/drivers/input/touchscreen/melfas_mip4.c
@@ -1332,7 +1332,7 @@ static ssize_t mip4_sysfs_fw_update(struct device *dev,
 	return count;
 }
 
-static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mip4_sysfs_fw_update);
+static DEVICE_ATTR(update_fw, 0200, NULL, mip4_sysfs_fw_update);
 
 static ssize_t mip4_sysfs_read_fw_version(struct device *dev,
 					  struct device_attribute *attr,
@@ -1354,7 +1354,7 @@ static ssize_t mip4_sysfs_read_fw_version(struct device *dev,
 	return count;
 }
 
-static DEVICE_ATTR(fw_version, S_IRUGO, mip4_sysfs_read_fw_version, NULL);
+static DEVICE_ATTR(fw_version, 0444, mip4_sysfs_read_fw_version, NULL);
 
 static ssize_t mip4_sysfs_read_hw_version(struct device *dev,
 					  struct device_attribute *attr,
@@ -1379,7 +1379,7 @@ static ssize_t mip4_sysfs_read_hw_version(struct device *dev,
 	return count;
 }
 
-static DEVICE_ATTR(hw_version, S_IRUGO, mip4_sysfs_read_hw_version, NULL);
+static DEVICE_ATTR(hw_version, 0444, mip4_sysfs_read_hw_version, NULL);
 
 static ssize_t mip4_sysfs_read_product_id(struct device *dev,
 					  struct device_attribute *attr,
@@ -1398,7 +1398,7 @@ static ssize_t mip4_sysfs_read_product_id(struct device *dev,
 	return count;
 }
 
-static DEVICE_ATTR(product_id, S_IRUGO, mip4_sysfs_read_product_id, NULL);
+static DEVICE_ATTR(product_id, 0444, mip4_sysfs_read_product_id, NULL);
 
 static ssize_t mip4_sysfs_read_ic_name(struct device *dev,
 					  struct device_attribute *attr,
@@ -1418,7 +1418,7 @@ static ssize_t mip4_sysfs_read_ic_name(struct device *dev,
 	return count;
 }
 
-static DEVICE_ATTR(ic_name, S_IRUGO, mip4_sysfs_read_ic_name, NULL);
+static DEVICE_ATTR(ic_name, 0444, mip4_sysfs_read_ic_name, NULL);
 
 static struct attribute *mip4_attrs[] = {
 	&dev_attr_fw_version.attr,
-- 
2.17.1


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

* [PATCH 09/11] touchscreen: raydium_ts: Use octal permissions
  2018-07-21 19:09 [PATCH 02/11] touchscreen: ad7877: Use octal permissions dev-harsh1998
                   ` (5 preceding siblings ...)
  2018-07-21 19:09 ` [PATCH 08/11] touchscreen: melfas: " dev-harsh1998
@ 2018-07-21 19:09 ` dev-harsh1998
  2018-07-21 19:09 ` [PATCH 10/11] touchscreen: sun4i_ts: " dev-harsh1998
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: dev-harsh1998 @ 2018-07-21 19:09 UTC (permalink / raw)
  To: trivial
  Cc: Dmitry Torokhov, Andi Shyti, Simon Budig, Luca Ceresoli,
	Jeffrey Lin, linux-input, linux-kernel

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(fw_version, S_IRUGO, raydium_i2c_fw_ver_show, NULL);

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(hw_version, S_IRUGO, raydium_i2c_hw_ver_show, NULL);

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(boot_mode, S_IRUGO, raydium_i2c_boot_mode_show, NULL);

WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'.
+static DEVICE_ATTR(update_fw, S_IWUSR, NULL, raydium_i2c_update_fw_store);

WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'.
+static DEVICE_ATTR(calibrate, S_IWUSR, NULL, raydium_i2c_calibrate_store);

Signed-off-by: dev-harsh1998 <harshitjain6751@gmail.com>
---
 drivers/input/touchscreen/raydium_i2c_ts.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/input/touchscreen/raydium_i2c_ts.c b/drivers/input/touchscreen/raydium_i2c_ts.c
index d1c09e6a2cb6..eddbb51e55dd 100644
--- a/drivers/input/touchscreen/raydium_i2c_ts.c
+++ b/drivers/input/touchscreen/raydium_i2c_ts.c
@@ -934,9 +934,9 @@ static ssize_t raydium_i2c_calibrate_store(struct device *dev,
 	return error ?: count;
 }
 
-static DEVICE_ATTR(fw_version, S_IRUGO, raydium_i2c_fw_ver_show, NULL);
-static DEVICE_ATTR(hw_version, S_IRUGO, raydium_i2c_hw_ver_show, NULL);
-static DEVICE_ATTR(boot_mode, S_IRUGO, raydium_i2c_boot_mode_show, NULL);
+static DEVICE_ATTR(fw_version, 0444, raydium_i2c_fw_ver_show, NULL);
+static DEVICE_ATTR(hw_version, 0444, raydium_i2c_hw_ver_show, NULL);
+static DEVICE_ATTR(boot_mode, 0444, raydium_i2c_boot_mode_show, NULL);
 static DEVICE_ATTR(update_fw, S_IWUSR, NULL, raydium_i2c_update_fw_store);
 static DEVICE_ATTR(calibrate, S_IWUSR, NULL, raydium_i2c_calibrate_store);
 
-- 
2.17.1


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

* [PATCH 10/11] touchscreen: sun4i_ts: Use octal permissions
  2018-07-21 19:09 [PATCH 02/11] touchscreen: ad7877: Use octal permissions dev-harsh1998
                   ` (6 preceding siblings ...)
  2018-07-21 19:09 ` [PATCH 09/11] touchscreen: raydium_ts: " dev-harsh1998
@ 2018-07-21 19:09 ` dev-harsh1998
  2018-07-21 19:09 ` [PATCH 11/11] touchscreen: tsc200x: " dev-harsh1998
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: dev-harsh1998 @ 2018-07-21 19:09 UTC (permalink / raw)
  To: trivial
  Cc: Dmitry Torokhov, Maxime Ripard, Chen-Yu Tsai, Andi Shyti,
	Simon Budig, Luca Ceresoli, Julia Lawall, linux-input,
	linux-kernel, linux-arm-kernel

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL);

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(temp1_label, S_IRUGO, show_temp_label, NULL);

Signed-off-by: dev-harsh1998 <harshitjain6751@gmail.com>
---
 drivers/input/touchscreen/sun4i-ts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c
index d2e14d9e5975..78960961a524 100644
--- a/drivers/input/touchscreen/sun4i-ts.c
+++ b/drivers/input/touchscreen/sun4i-ts.c
@@ -230,8 +230,8 @@ static ssize_t show_temp_label(struct device *dev,
 	return sprintf(buf, "SoC temperature\n");
 }
 
-static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL);
-static DEVICE_ATTR(temp1_label, S_IRUGO, show_temp_label, NULL);
+static DEVICE_ATTR(temp1_input, 0444, show_temp, NULL);
+static DEVICE_ATTR(temp1_label, 0444, show_temp_label, NULL);
 
 static struct attribute *sun4i_ts_attrs[] = {
 	&dev_attr_temp1_input.attr,
-- 
2.17.1


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

* [PATCH 11/11] touchscreen: tsc200x: Use octal permissions
  2018-07-21 19:09 [PATCH 02/11] touchscreen: ad7877: Use octal permissions dev-harsh1998
                   ` (7 preceding siblings ...)
  2018-07-21 19:09 ` [PATCH 10/11] touchscreen: sun4i_ts: " dev-harsh1998
@ 2018-07-21 19:09 ` dev-harsh1998
  2018-07-23  5:08   ` Martin Kepplinger
  2018-07-21 19:09 ` [PATCH 01/11] touchscreen: ft5x06: " dev-harsh1998
  2018-07-22  8:29 ` [PATCH 02/11] touchscreen: ad7877: " Joe Perches
  10 siblings, 1 reply; 15+ messages in thread
From: dev-harsh1998 @ 2018-07-21 19:09 UTC (permalink / raw)
  To: trivial
  Cc: Dmitry Torokhov, Simon Budig, Andi Shyti, Luca Ceresoli,
	Martin Kepplinger, Kees Cook, linux-input, linux-kernel

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(selftest, S_IRUGO, tsc200x_selftest_show, NULL);

Signed-off-by: dev-harsh1998 <harshitjain6751@gmail.com>
---
 drivers/input/touchscreen/tsc200x-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/tsc200x-core.c b/drivers/input/touchscreen/tsc200x-core.c
index e0fde590df8e..daefeca101ff 100644
--- a/drivers/input/touchscreen/tsc200x-core.c
+++ b/drivers/input/touchscreen/tsc200x-core.c
@@ -336,7 +336,7 @@ static ssize_t tsc200x_selftest_show(struct device *dev,
 	return sprintf(buf, "%d\n", success);
 }
 
-static DEVICE_ATTR(selftest, S_IRUGO, tsc200x_selftest_show, NULL);
+static DEVICE_ATTR(selftest, 0444, tsc200x_selftest_show, NULL);
 
 static struct attribute *tsc200x_attrs[] = {
 	&dev_attr_selftest.attr,
-- 
2.17.1


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

* [PATCH 01/11] touchscreen: ft5x06: Use octal permissions
  2018-07-21 19:09 [PATCH 02/11] touchscreen: ad7877: Use octal permissions dev-harsh1998
                   ` (8 preceding siblings ...)
  2018-07-21 19:09 ` [PATCH 11/11] touchscreen: tsc200x: " dev-harsh1998
@ 2018-07-21 19:09 ` dev-harsh1998
  2018-07-22  8:29 ` [PATCH 02/11] touchscreen: ad7877: " Joe Perches
  10 siblings, 0 replies; 15+ messages in thread
From: dev-harsh1998 @ 2018-07-21 19:09 UTC (permalink / raw)
  To: trivial
  Cc: Dmitry Torokhov, Andi Shyti, Simon Budig, Luca Ceresoli,
	linux-input, linux-kernel

WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'.
+static EDT_ATTR(gain, S_IWUSR | S_IRUGO, WORK_REGISTER_GAIN,

WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'.
+static EDT_ATTR(offset, S_IWUSR | S_IRUGO, WORK_REGISTER_OFFSET,

WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'.
+static EDT_ATTR(threshold, S_IWUSR | S_IRUGO, WORK_REGISTER_THRESHOLD,

WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'.
+static EDT_ATTR(report_rate, S_IWUSR | S_IRUGO, WORK_REGISTER_REPORT_RATE,

WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'.
+	debugfs_create_u16("num_x", S_IRUSR, tsdata->debug_dir, &tsdata->num_x);

WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'.
+	debugfs_create_u16("num_y", S_IRUSR, tsdata->debug_dir, &tsdata->num_y);

WARNING: Symbolic permissions 'S_IRUSR | S_IWUSR' are not preferred. Consider using octal permissions '0600'.
+	debugfs_create_file("mode", S_IRUSR | S_IWUSR,

WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'.
+	debugfs_create_file("raw_data", S_IRUSR,

Signed-off-by: dev-harsh1998 <harshitjain6751@gmail.com>
---
 drivers/input/touchscreen/edt-ft5x06.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index 1e18ca0d1b4e..ea4026682e79 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -479,16 +479,16 @@ static ssize_t edt_ft5x06_setting_store(struct device *dev,
 }
 
 /* m06, m09: range 0-31, m12: range 0-5 */
-static EDT_ATTR(gain, S_IWUSR | S_IRUGO, WORK_REGISTER_GAIN,
+static EDT_ATTR(gain, 0644, WORK_REGISTER_GAIN,
 		M09_REGISTER_GAIN, 0, 31);
 /* m06, m09: range 0-31, m12: range 0-16 */
-static EDT_ATTR(offset, S_IWUSR | S_IRUGO, WORK_REGISTER_OFFSET,
+static EDT_ATTR(offset, 0644, WORK_REGISTER_OFFSET,
 		M09_REGISTER_OFFSET, 0, 31);
 /* m06: range 20 to 80, m09: range 0 to 30, m12: range 1 to 255... */
-static EDT_ATTR(threshold, S_IWUSR | S_IRUGO, WORK_REGISTER_THRESHOLD,
+static EDT_ATTR(threshold, 0644, WORK_REGISTER_THRESHOLD,
 		M09_REGISTER_THRESHOLD, 0, 255);
 /* m06: range 3 to 14, m12: (0x64: 100Hz) */
-static EDT_ATTR(report_rate, S_IWUSR | S_IRUGO, WORK_REGISTER_REPORT_RATE,
+static EDT_ATTR(report_rate, 0644, WORK_REGISTER_REPORT_RATE,
 		NO_REGISTER, 0, 255);
 
 static struct attribute *edt_ft5x06_attrs[] = {
@@ -739,12 +739,12 @@ edt_ft5x06_ts_prepare_debugfs(struct edt_ft5x06_ts_data *tsdata,
 	if (!tsdata->debug_dir)
 		return;
 
-	debugfs_create_u16("num_x", S_IRUSR, tsdata->debug_dir, &tsdata->num_x);
-	debugfs_create_u16("num_y", S_IRUSR, tsdata->debug_dir, &tsdata->num_y);
+	debugfs_create_u16("num_x", 0400, tsdata->debug_dir, &tsdata->num_x);
+	debugfs_create_u16("num_y", 0400, tsdata->debug_dir, &tsdata->num_y);
 
-	debugfs_create_file("mode", S_IRUSR | S_IWUSR,
+	debugfs_create_file("mode", 0600,
 			    tsdata->debug_dir, tsdata, &debugfs_mode_fops);
-	debugfs_create_file("raw_data", S_IRUSR,
+	debugfs_create_file("raw_data", 0400,
 			    tsdata->debug_dir, tsdata, &debugfs_raw_data_fops);
 }
 
-- 
2.17.1


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

* Re: [PATCH 02/11] touchscreen: ad7877: Use octal permissions
  2018-07-21 19:09 [PATCH 02/11] touchscreen: ad7877: Use octal permissions dev-harsh1998
                   ` (9 preceding siblings ...)
  2018-07-21 19:09 ` [PATCH 01/11] touchscreen: ft5x06: " dev-harsh1998
@ 2018-07-22  8:29 ` Joe Perches
  10 siblings, 0 replies; 15+ messages in thread
From: Joe Perches @ 2018-07-22  8:29 UTC (permalink / raw)
  To: dev-harsh1998, trivial
  Cc: Michael Hennerich, Dmitry Torokhov, Simon Budig, Andi Shyti,
	Luca Ceresoli, linux-input, linux-kernel

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)


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

* Re: [PATCH 05/11] touchscreen: elants: Use octal permissions
  2018-07-21 19:09 ` [PATCH 05/11] touchscreen: elants: " dev-harsh1998
@ 2018-07-22  9:39   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 15+ messages in thread
From: Greg Kroah-Hartman @ 2018-07-22  9:39 UTC (permalink / raw)
  To: dev-harsh1998
  Cc: trivial, Dmitry Torokhov, Andi Shyti, Simon Budig, Luca Ceresoli,
	Guenter Roeck, Joe Perches, linux-input, linux-kernel

On Sun, Jul 22, 2018 at 12:39:45AM +0530, dev-harsh1998 wrote:
> WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
> +static DEVICE_ATTR(iap_mode, S_IRUGO, show_iap_mode, NULL);
> 
> WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'.
> +static DEVICE_ATTR(update_fw, S_IWUSR, NULL, write_update_fw)
> 
> WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
> +		.dattr = __ATTR(_field, S_IRUGO,			\
> 
> Signed-off-by: dev-harsh1998 <harshitjain6751@gmail.com>

You need to use your real name when creating Linux kernel patches.

thanks,

greg k-h

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

* Re: [PATCH 11/11] touchscreen: tsc200x: Use octal permissions
  2018-07-21 19:09 ` [PATCH 11/11] touchscreen: tsc200x: " dev-harsh1998
@ 2018-07-23  5:08   ` Martin Kepplinger
  0 siblings, 0 replies; 15+ messages in thread
From: Martin Kepplinger @ 2018-07-23  5:08 UTC (permalink / raw)
  To: dev-harsh1998, trivial
  Cc: Dmitry Torokhov, Simon Budig, Andi Shyti, Luca Ceresoli,
	Kees Cook, linux-input, linux-kernel

On 2018-07-21 21:09, dev-harsh1998 wrote:
> WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
> +static DEVICE_ATTR(selftest, S_IRUGO, tsc200x_selftest_show, NULL);
> 
> Signed-off-by: dev-harsh1998 <harshitjain6751@gmail.com>

Acked-by: Martin Kepplinger <martink@posteo.de>


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

* [PATCH 08/11] touchscreen: melfas: Use octal permissions
  2018-07-23 13:19 dev-harsh1998
@ 2018-07-23 13:19 ` dev-harsh1998
  0 siblings, 0 replies; 15+ messages in thread
From: dev-harsh1998 @ 2018-07-23 13:19 UTC (permalink / raw)
  To: trivial
  Cc: Harshit Jain, Dmitry Torokhov, Sangwon Jee, Simon Budig,
	Andi Shyti, Luca Ceresoli, linux-input, linux-kernel

WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'.
+static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mip4_sysfs_fw_update);

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(fw_version, S_IRUGO, mip4_sysfs_read_fw_version, NULL);

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(hw_version, S_IRUGO, mip4_sysfs_read_hw_version, NULL);

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(product_id, S_IRUGO, mip4_sysfs_read_product_id, NULL);

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(ic_name, S_IRUGO, mip4_sysfs_read_ic_name, NULL);

Signed-off-by: Harshit Jain <harshitjain6751@gmail.com>
---
 drivers/input/touchscreen/melfas_mip4.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/input/touchscreen/melfas_mip4.c b/drivers/input/touchscreen/melfas_mip4.c
index 430a2bc5f7ca..f7fd940e61ea 100644
--- a/drivers/input/touchscreen/melfas_mip4.c
+++ b/drivers/input/touchscreen/melfas_mip4.c
@@ -1332,7 +1332,7 @@ static ssize_t mip4_sysfs_fw_update(struct device *dev,
 	return count;
 }
 
-static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mip4_sysfs_fw_update);
+static DEVICE_ATTR(update_fw, 0200, NULL, mip4_sysfs_fw_update);
 
 static ssize_t mip4_sysfs_read_fw_version(struct device *dev,
 					  struct device_attribute *attr,
@@ -1354,7 +1354,7 @@ static ssize_t mip4_sysfs_read_fw_version(struct device *dev,
 	return count;
 }
 
-static DEVICE_ATTR(fw_version, S_IRUGO, mip4_sysfs_read_fw_version, NULL);
+static DEVICE_ATTR(fw_version, 0444, mip4_sysfs_read_fw_version, NULL);
 
 static ssize_t mip4_sysfs_read_hw_version(struct device *dev,
 					  struct device_attribute *attr,
@@ -1379,7 +1379,7 @@ static ssize_t mip4_sysfs_read_hw_version(struct device *dev,
 	return count;
 }
 
-static DEVICE_ATTR(hw_version, S_IRUGO, mip4_sysfs_read_hw_version, NULL);
+static DEVICE_ATTR(hw_version, 0444, mip4_sysfs_read_hw_version, NULL);
 
 static ssize_t mip4_sysfs_read_product_id(struct device *dev,
 					  struct device_attribute *attr,
@@ -1398,7 +1398,7 @@ static ssize_t mip4_sysfs_read_product_id(struct device *dev,
 	return count;
 }
 
-static DEVICE_ATTR(product_id, S_IRUGO, mip4_sysfs_read_product_id, NULL);
+static DEVICE_ATTR(product_id, 0444, mip4_sysfs_read_product_id, NULL);
 
 static ssize_t mip4_sysfs_read_ic_name(struct device *dev,
 					  struct device_attribute *attr,
@@ -1418,7 +1418,7 @@ static ssize_t mip4_sysfs_read_ic_name(struct device *dev,
 	return count;
 }
 
-static DEVICE_ATTR(ic_name, S_IRUGO, mip4_sysfs_read_ic_name, NULL);
+static DEVICE_ATTR(ic_name, 0444, mip4_sysfs_read_ic_name, NULL);
 
 static struct attribute *mip4_attrs[] = {
 	&dev_attr_fw_version.attr,
-- 
2.17.1


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

end of thread, other threads:[~2018-07-23 13:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-21 19:09 [PATCH 02/11] touchscreen: ad7877: Use octal permissions dev-harsh1998
2018-07-21 19:09 ` [PATCH 03/11] touchscreen: ad7846: " dev-harsh1998
2018-07-21 19:09 ` [PATCH 04/11] touchscreen: amtel: " dev-harsh1998
2018-07-21 19:09 ` [PATCH 05/11] touchscreen: elants: " dev-harsh1998
2018-07-22  9:39   ` Greg Kroah-Hartman
2018-07-21 19:09 ` [PATCH 06/11] touchscreen: ili210x: " dev-harsh1998
2018-07-21 19:09 ` [PATCH 07/11] touchscreen: mc13783: " dev-harsh1998
2018-07-21 19:09 ` [PATCH 08/11] touchscreen: melfas: " dev-harsh1998
2018-07-21 19:09 ` [PATCH 09/11] touchscreen: raydium_ts: " dev-harsh1998
2018-07-21 19:09 ` [PATCH 10/11] touchscreen: sun4i_ts: " dev-harsh1998
2018-07-21 19:09 ` [PATCH 11/11] touchscreen: tsc200x: " dev-harsh1998
2018-07-23  5:08   ` Martin Kepplinger
2018-07-21 19:09 ` [PATCH 01/11] touchscreen: ft5x06: " dev-harsh1998
2018-07-22  8:29 ` [PATCH 02/11] touchscreen: ad7877: " Joe Perches
2018-07-23 13:19 dev-harsh1998
2018-07-23 13:19 ` [PATCH 08/11] touchscreen: melfas: " dev-harsh1998

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).