linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: [PATCH] watchdog: Replace symbolic permissions with octal permissions
       [not found] <20210626100922.54218-1-wjc@cdjrlc.com>
@ 2021-06-26 18:16 ` Winkler, Tomas
  2021-06-27 14:51 ` Guenter Roeck
  1 sibling, 0 replies; 2+ messages in thread
From: Winkler, Tomas @ 2021-06-26 18:16 UTC (permalink / raw)
  To: Jinchao Wang, wim, linux; +Cc: linux-kernel, linux-watchdog

> Subject: [PATCH] watchdog: Replace symbolic permissions with octal
> permissions
> 
> Resolve following checkpatch issue,
> Replace symbolic permissions with octal permissions


Ack for mei_wdt.c 

> Signed-off-by: Jinchao Wang <wjc@cdjrlc.com>
> ---
>  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(-)
> 
> diff --git a/drivers/watchdog/mei_wdt.c b/drivers/watchdog/mei_wdt.c
> index c7a7235e6224..3ee5b9e83c7e 100644
> --- a/drivers/watchdog/mei_wdt.c
> +++ b/drivers/watchdog/mei_wdt.c
> @@ -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);
>  }
> 
> diff --git a/drivers/watchdog/ni903x_wdt.c
> b/drivers/watchdog/ni903x_wdt.c index 4cebad324b20..4d85082e0ce9
> 100644
> --- a/drivers/watchdog/ni903x_wdt.c
> +++ b/drivers/watchdog/ni903x_wdt.c
> @@ -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.c b/drivers/watchdog/sbsa_gwdt.c index
> ee9ff38929eb..369d2f922ecc 100644
> --- a/drivers/watchdog/sbsa_gwdt.c
> +++ b/drivers/watchdog/sbsa_gwdt.c
> @@ -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) ")"); diff --
> git a/drivers/watchdog/sun4v_wdt.c b/drivers/watchdog/sun4v_wdt.c index
> 8db86ad5ee3d..22ee4b6093a2 100644
> --- a/drivers/watchdog/sun4v_wdt.c
> +++ b/drivers/watchdog/sun4v_wdt.c
> @@ -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) ")");
> 
> diff --git a/drivers/watchdog/xen_wdt.c b/drivers/watchdog/xen_wdt.c
> index b343f421dc72..d9e8408ce60d 100644
> --- a/drivers/watchdog/xen_wdt.c
> +++ b/drivers/watchdog/xen_wdt.c
> @@ -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) ")");
> 
> diff --git a/drivers/watchdog/ziirave_wdt.c
> b/drivers/watchdog/ziirave_wdt.c index c5a9b820d43a..aa6dcb604ab0
> 100644
> --- a/drivers/watchdog/ziirave_wdt.c
> +++ b/drivers/watchdog/ziirave_wdt.c
> @@ -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[] = {
> --
> 2.31.1
> 
> 


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

* Re: [PATCH] watchdog: Replace symbolic permissions with octal permissions
       [not found] <20210626100922.54218-1-wjc@cdjrlc.com>
  2021-06-26 18:16 ` [PATCH] watchdog: Replace symbolic permissions with octal permissions Winkler, Tomas
@ 2021-06-27 14:51 ` Guenter Roeck
  1 sibling, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2021-06-27 14:51 UTC (permalink / raw)
  To: Jinchao Wang, tomas.winkler, wim; +Cc: linux-kernel, linux-watchdog

On 6/26/21 3:09 AM, Jinchao Wang wrote:
> Resolve following checkpatch issue,
> Replace symbolic permissions with octal permissions
> 
> Signed-off-by: Jinchao Wang <wjc@cdjrlc.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   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(-)
> 
> diff --git a/drivers/watchdog/mei_wdt.c b/drivers/watchdog/mei_wdt.c
> index c7a7235e6224..3ee5b9e83c7e 100644
> --- a/drivers/watchdog/mei_wdt.c
> +++ b/drivers/watchdog/mei_wdt.c
> @@ -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);
>   }
>   
> diff --git a/drivers/watchdog/ni903x_wdt.c b/drivers/watchdog/ni903x_wdt.c
> index 4cebad324b20..4d85082e0ce9 100644
> --- a/drivers/watchdog/ni903x_wdt.c
> +++ b/drivers/watchdog/ni903x_wdt.c
> @@ -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.c b/drivers/watchdog/sbsa_gwdt.c
> index ee9ff38929eb..369d2f922ecc 100644
> --- a/drivers/watchdog/sbsa_gwdt.c
> +++ b/drivers/watchdog/sbsa_gwdt.c
> @@ -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) ")");
> diff --git a/drivers/watchdog/sun4v_wdt.c b/drivers/watchdog/sun4v_wdt.c
> index 8db86ad5ee3d..22ee4b6093a2 100644
> --- a/drivers/watchdog/sun4v_wdt.c
> +++ b/drivers/watchdog/sun4v_wdt.c
> @@ -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) ")");
>   
> diff --git a/drivers/watchdog/xen_wdt.c b/drivers/watchdog/xen_wdt.c
> index b343f421dc72..d9e8408ce60d 100644
> --- a/drivers/watchdog/xen_wdt.c
> +++ b/drivers/watchdog/xen_wdt.c
> @@ -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) ")");
>   
> diff --git a/drivers/watchdog/ziirave_wdt.c b/drivers/watchdog/ziirave_wdt.c
> index c5a9b820d43a..aa6dcb604ab0 100644
> --- a/drivers/watchdog/ziirave_wdt.c
> +++ b/drivers/watchdog/ziirave_wdt.c
> @@ -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[] = {
> 


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

end of thread, other threads:[~2021-06-27 14:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210626100922.54218-1-wjc@cdjrlc.com>
2021-06-26 18:16 ` [PATCH] watchdog: Replace symbolic permissions with octal permissions Winkler, Tomas
2021-06-27 14:51 ` Guenter Roeck

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