From: Guenter Roeck <linux@roeck-us.net>
To: Jinchao Wang <wjc@cdjrlc.com>,
tomas.winkler@intel.com, wim@linux-watchdog.org
Cc: linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org
Subject: Re: [PATCH] watchdog: Replace symbolic permissions with octal permissions
Date: Sun, 27 Jun 2021 07:51:59 -0700 [thread overview]
Message-ID: <4d344004-b307-9bc9-7989-674e9e9d87a5@roeck-us.net> (raw)
In-Reply-To: <20210626100922.54218-1-wjc@cdjrlc.com>
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[] = {
>
prev parent reply other threads:[~2021-06-27 14:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4d344004-b307-9bc9-7989-674e9e9d87a5@roeck-us.net \
--to=linux@roeck-us.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=tomas.winkler@intel.com \
--cc=wim@linux-watchdog.org \
--cc=wjc@cdjrlc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).