lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 29 May 2020 10:24:28 +0900
From:   Bumsik Kim <kbumsik@...il.com>
To:     wim@...ux-watchdog.org, linux@...ck-us.net, corbet@....net
Cc:     linux-kernel@...r.kernel.org, linux-watchdog@...r.kernel.org,
        Bumsik Kim <k.bumsik@...il.com>
Subject: [PATCH] watchdog: test_bit() => watchdog_active()

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@...il.com>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ