Skip to contentSkip to conversation

staging: gasket: replace symbolic permissions with octal permissions

PATCH In review Himadri Pandya 2 participants 2 messages Apr 10, 2019 – Apr 16, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: gasket: replace symbolic permissions with octal permissions

Resolve checkpatch warning for using symbolic permissions by replacing them with octal permissions.

---
 drivers/staging/gasket/gasket_sysfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/gasket/gasket_sysfs.h +1 -1
index 1d0eed66a7f4..28dc422d388c 100644
@@ -75,7 +75,7 @@ struct gasket_sysfs_attribute {
 
 #define GASKET_SYSFS_RO(_name, _show_function, _attr_type)                     \
 	{                                                                      \
-		.attr = __ATTR(_name, S_IRUGO, _show_function, NULL),          \
+		.attr = __ATTR(_name, 0444, _show_function, NULL),          \
 		.data.attr_type = _attr_type                                   \
 	}
 
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 13 lines · Himadri Pandya

Resolve checkpatch warning for using symbolic permissions by replacing them with octal permissions.

---
 drivers/staging/gasket/gasket_sysfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/gasket/gasket_sysfs.h +0 -0
index 1d0eed66a7f4..28dc422d388c 100644

drivers/staging/gasket/gasket_sysfs.h struct gasket_sysfs_attribute { · line 80

Quoted 7 lines
drivers/staging/gasket/gasket_sysfs.h +1 -1
@@ -75,7 +75,7 @@ struct gasket_sysfs_attribute {
 
 #define GASKET_SYSFS_RO(_name, _show_function, _attr_type)                     \
 	{                                                                      \
-		.attr = __ATTR(_name, S_IRUGO, _show_function, NULL),          \
+		.attr = __ATTR(_name, 0444, _show_function, NULL),          \
 		.data.attr_type = _attr_type                                   \
 	}

This has been rejected many times in the past as the real solution is to use __ATTR_RO here.

thanks,

greg k-h