watchdog: Replace symbolic permissions with octal permissions
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines
Subject: [PATCH] watchdog: Replace symbolic permissions with octal permissions
Resolve following checkpatch issue,
Replace symbolic permissions with octal permissions
Ack for mei_wdt.c
Quoted 139 lines
Signed-off-by Jinchao Wang <[email protected]>--- drivers/watchdog/mei_wdt.c | 4 ++-- drivers/watchdog/ni903x_wdt.c | 2 +- drivers/watchdog/sbsa_gwdt.c | 2 +- drivers/watchdog/sun4v_wdt.c | 2 +- drivers/watchdog/xen_wdt.c | 4 ++-- drivers/watchdog/ziirave_wdt.c | 8 ++++---- 6 files changed, 11 insertions(+), 11 deletions(-)drivers/watchdog/mei_wdt.c +2
-2@@ -545,9 +545,9 @@ static void dbgfs_register(struct mei_wdt *wdt) dir =debugfs_create_dir (KBUILD_MODNAME ,NULL ); wdt->dbgfs_dir = dir; -debugfs_create_file ("state" ,S_IRUSR , dir, wdt, &dbgfs_fops_state); +debugfs_create_file ("state" ,0400 , dir, wdt, &dbgfs_fops_state); -debugfs_create_file ("activation" ,S_IRUSR , dir, wdt, +debugfs_create_file ("activation" ,0400 , dir, wdt, &dbgfs_fops_activation); }(quoted diff) +0
-0
b/drivers/watchdog/ni903x_wdt.cindex4cebad324b20..4d85082e0ce9100644drivers/watchdog/ni903x_wdt.c +1
-0@@ -48,7 +48,7 @@ MODULE_PARM_DESC(timeout, __MODULE_STRING(NIWD_DEFAULT_TIMEOUT) ")");static int nowayout =WATCHDOG_NOWAYOUT ; -module_param (nowayout, int,S_IRUGO ); +module_param (nowayout, int,0444 );MODULE_PARM_DESC (nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); diff --git
a/drivers/watchdog/sbsa_gwdt.cb/drivers/watchdog/sbsa_gwdt.cindexee9ff38929eb..369d2f922ecc100644drivers/watchdog/sbsa_gwdt.c +0
-0@@ -112,7 +112,7 @@ MODULE_PARM_DESC(action, "after watchdog getsWS0 interrupt, do: "
"0 =skip(*)1 = panic");static bool nowayout =
WATCHDOG_NOWAYOUT; -module_param(nowayout, bool, S_IRUGO);drivers/watchdog/sbsa_gwdt.c +1
-0+module_param (nowayout, bool,0444 );MODULE_PARM_DESC (nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); diff --git
a/drivers/watchdog/sun4v_wdt.cb/drivers/watchdog/sun4v_wdt.cindex8db86ad5ee3d..22ee4b6093a2100644drivers/watchdog/sun4v_wdt.c +0
-0@@ -30,7 +30,7 @@ MODULE_PARM_DESC(timeout, "Watchdog timeout inseconds (default="
__MODULE_STRING(WDT_TIMEOUT)")");static bool nowayout =
WATCHDOG_NOWAYOUT; -module_param(nowayout, bool, S_IRUGO); +module_param(nowayout, bool, 0444);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once
started (default="drivers/watchdog/sun4v_wdt.c +0
-0__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");drivers/watchdog/xen_wdt.c +2
-0@@ -28,12 +28,12 @@ static time64_t wdt_expires;#define WATCHDOG_TIMEOUT 60/* in seconds */ static unsigned int timeout; -module_param (timeout, uint,S_IRUGO ); +module_param (timeout, uint,0444 ); MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds " "(default=" __MODULE_STRING(WATCHDOG_TIMEOUT) ")");static bool nowayout =WATCHDOG_NOWAYOUT ; -module_param (nowayout, bool,S_IRUGO ); +module_param (nowayout, bool,0444 ); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped oncestarted "
drivers/watchdog/xen_wdt.c +0
-0"(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");(quoted diff) +0
-0
b/drivers/watchdog/ziirave_wdt.cindexc5a9b820d43a..aa6dcb604ab0100644drivers/watchdog/ziirave_wdt.c +1
-1@@ -451,7 +451,7 @@ static ssize_t ziirave_wdt_sysfs_show_firm(structdevice *dev, return ret; } -static DEVICE_ATTR(firmware_version, S_IRUGO, ziirave_wdt_sysfs_show_firm, +static DEVICE_ATTR(firmware_version, 0444, ziirave_wdt_sysfs_show_firm,NULL );static
ssize_tziirave_wdt_sysfs_show_boot(struct device *dev, @@ -475,7
+475,7 @@ staticssize_tziirave_wdt_sysfs_show_boot(struct device *dev,drivers/watchdog/ziirave_wdt.c +0
-1return ret; } -static DEVICE_ATTR(bootloader_version, S_IRUGO,
ziirave_wdt_sysfs_show_boot,drivers/watchdog/ziirave_wdt.c +2
-0+static DEVICE_ATTR(bootloader_version, 0444, +ziirave_wdt_sysfs_show_boot, NULL); static ssize_t ziirave_wdt_sysfs_show_reason(struct device *dev, @@ -497,7 +497,7 @@ static
ssize_tziirave_wdt_sysfs_show_reason(struct device *dev,drivers/watchdog/ziirave_wdt.c +0
-1return ret; } -static DEVICE_ATTR(reset_reason, S_IRUGO,
ziirave_wdt_sysfs_show_reason,drivers/watchdog/ziirave_wdt.c +3
-2+static DEVICE_ATTR(reset_reason, 0444, ziirave_wdt_sysfs_show_reason, NULL); static ssize_t ziirave_wdt_sysfs_store_firm(struct device *dev, @@ -552,7 +552,7 @@ static ssize_t ziirave_wdt_sysfs_store_firm(struct device *dev, return err ? err : count; } -static DEVICE_ATTR(update_firmware, S_IWUSR, NULL, +static DEVICE_ATTR(update_firmware, 0200, NULL, ziirave_wdt_sysfs_store_firm); static struct attribute *ziirave_wdt_attrs[] = { --2.31.1
Quoted 4 lines · Jinchao Wang
Resolve following checkpatch issue,
Replace symbolic permissions with octal permissionsSigned-off-by Jinchao Wang <[email protected]>
Quoted 124 lines
--- drivers/watchdog/mei_wdt.c | 4 ++-- drivers/watchdog/ni903x_wdt.c | 2 +- drivers/watchdog/sbsa_gwdt.c | 2 +- drivers/watchdog/sun4v_wdt.c | 2 +- drivers/watchdog/xen_wdt.c | 4 ++-- drivers/watchdog/ziirave_wdt.c | 8 ++++---- 6 files changed, 11 insertions(+), 11 deletions(-)drivers/watchdog/mei_wdt.c +2
-2@@ -545,9 +545,9 @@ static void dbgfs_register(struct mei_wdt *wdt) dir =debugfs_create_dir (KBUILD_MODNAME ,NULL ); wdt->dbgfs_dir = dir; -debugfs_create_file ("state" ,S_IRUSR , dir, wdt, &dbgfs_fops_state); +debugfs_create_file ("state" ,0400 , dir, wdt, &dbgfs_fops_state); -debugfs_create_file ("activation" ,S_IRUSR , dir, wdt, +debugfs_create_file ("activation" ,0400 , dir, wdt, &dbgfs_fops_activation); }drivers/watchdog/ni903x_wdt.c +1
-1@@ -48,7 +48,7 @@ MODULE_PARM_DESC(timeout, __MODULE_STRING(NIWD_DEFAULT_TIMEOUT) ")");static int nowayout =WATCHDOG_NOWAYOUT ; -module_param (nowayout, int,S_IRUGO ); +module_param (nowayout, int,0444 );MODULE_PARM_DESC (nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");drivers/watchdog/sbsa_gwdt.c +1
-1@@ -112,7 +112,7 @@ MODULE_PARM_DESC(action, "after watchdog gets WS0 interrupt, do: " "0 = skip(*) 1 = panic");static bool nowayout =WATCHDOG_NOWAYOUT ; -module_param (nowayout, bool,S_IRUGO ); +module_param (nowayout, bool,0444 );MODULE_PARM_DESC (nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");drivers/watchdog/sun4v_wdt.c +1
-1@@ -30,7 +30,7 @@ MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (default=" __MODULE_STRING(WDT_TIMEOUT) ")");static bool nowayout =WATCHDOG_NOWAYOUT ; -module_param (nowayout, bool,S_IRUGO ); +module_param (nowayout, bool,0444 ); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");drivers/watchdog/xen_wdt.c +2
-2@@ -28,12 +28,12 @@ static time64_t wdt_expires;#define WATCHDOG_TIMEOUT 60/* in seconds */ static unsigned int timeout; -module_param (timeout, uint,S_IRUGO ); +module_param (timeout, uint,0444 ); MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds " "(default=" __MODULE_STRING(WATCHDOG_TIMEOUT) ")");static bool nowayout =WATCHDOG_NOWAYOUT ; -module_param (nowayout, bool,S_IRUGO ); +module_param (nowayout, bool,0444 ); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started " "(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");drivers/watchdog/ziirave_wdt.c +4
-4@@ -451,7 +451,7 @@ static ssize_t ziirave_wdt_sysfs_show_firm(struct device *dev,return ret; } -static DEVICE_ATTR(firmware_version, S_IRUGO, ziirave_wdt_sysfs_show_firm, +static DEVICE_ATTR(firmware_version, 0444, ziirave_wdt_sysfs_show_firm, NULL); static ssize_t ziirave_wdt_sysfs_show_boot(struct device *dev,@@ -475,7 +475,7 @@ static ssize_t ziirave_wdt_sysfs_show_boot(struct device *dev,return ret; } -static DEVICE_ATTR(bootloader_version, S_IRUGO, ziirave_wdt_sysfs_show_boot, +static DEVICE_ATTR(bootloader_version, 0444, ziirave_wdt_sysfs_show_boot, NULL); static ssize_t ziirave_wdt_sysfs_show_reason(struct device *dev,@@ -497,7 +497,7 @@ static ssize_t ziirave_wdt_sysfs_show_reason(struct device *dev,return ret; } -static DEVICE_ATTR(reset_reason, S_IRUGO, ziirave_wdt_sysfs_show_reason, +static DEVICE_ATTR(reset_reason, 0444, ziirave_wdt_sysfs_show_reason, NULL); static ssize_t ziirave_wdt_sysfs_store_firm(struct device *dev,@@ -552,7 +552,7 @@ static ssize_t ziirave_wdt_sysfs_store_firm(struct device *dev,return err ? err : count; } -static DEVICE_ATTR(update_firmware, S_IWUSR, NULL, +static DEVICE_ATTR(update_firmware, 0200, NULL, ziirave_wdt_sysfs_store_firm);static struct attribute *ziirave_wdt_attrs[] = {