From: Guenter Roeck <linux@roeck-us.net>
To: Bumsik Kim <kbumsik@gmail.com>
Cc: wim@linux-watchdog.org, corbet@lwn.net,
linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org,
Bumsik Kim <k.bumsik@gmail.com>
Subject: Re: [PATCH] watchdog: test_bit() => watchdog_active()
Date: Fri, 29 May 2020 09:52:17 -0700 [thread overview]
Message-ID: <20200529165217.GB162777@roeck-us.net> (raw)
In-Reply-To: <20200529012428.84684-1-k.bumsik@gmail.com>
On Fri, May 29, 2020 at 10:24:28AM +0900, Bumsik Kim wrote:
> Use the dedicated function watchdog_active()
> instead of the generic test_bit() function.
>
> It is done using the following Coccinelle script:
>
> @@
> identifier wdd;
> @@
> - test_bit(WDOG_ACTIVE, &wdd->status)
> + watchdog_active(wdd)
>
> Signed-off-by: Bumsik Kim <k.bumsik@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/watchdog_dev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c
> index 7e4cd34a8c20..3ae608d78af2 100644
> --- a/drivers/watchdog/watchdog_dev.c
> +++ b/drivers/watchdog/watchdog_dev.c
> @@ -916,7 +916,7 @@ static int watchdog_release(struct inode *inode, struct file *file)
> * or if WDIOF_MAGICCLOSE is not set. If nowayout was set then
> * watchdog_stop will fail.
> */
> - if (!test_bit(WDOG_ACTIVE, &wdd->status))
> + if (!watchdog_active(wdd))
> err = 0;
> else if (test_and_clear_bit(_WDOG_ALLOW_RELEASE, &wd_data->status) ||
> !(wdd->info->options & WDIOF_MAGICCLOSE))
> --
> 2.26.2
>
prev parent reply other threads:[~2020-05-29 16:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-29 1:24 [PATCH] watchdog: test_bit() => watchdog_active() Bumsik Kim
2020-05-29 16:52 ` 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=20200529165217.GB162777@roeck-us.net \
--to=linux@roeck-us.net \
--cc=corbet@lwn.net \
--cc=k.bumsik@gmail.com \
--cc=kbumsik@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=wim@linux-watchdog.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.