summaryrefslogtreecommitdiff
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorJiapeng Zhong <abaci-bugfix@linux.alibaba.com>2021-01-20 15:48:10 +0800
committerWim Van Sebroeck <wim@linux-watchdog.org>2021-02-07 14:41:19 +0100
commit17f0d1b9bd3333228b5c420f2dae2d7a980636b8 (patch)
tree6f8a87f4aec08c94d3ee31fcaf4ea44ad7443dc5 /drivers/watchdog
parentfa0f8d51e90d2202be9f4f02b9a95347389a5959 (diff)
watchdog: hpwdt: Assign boolean values to a bool variable
Fix the following coccicheck warnings: ./drivers/watchdog/hpwdt.c:345:2-12: WARNING: Assignment of 0/1 to bool variable. ./drivers/watchdog/hpwdt.c:126:2-12: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com> Reviewed-by: Jerry Hoemann <jerry.hoemann@hpe.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/1611128890-79204-1-git-send-email-abaci-bugfix@linux.alibaba.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/hpwdt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index cbd1498ff015..22ddba3802ef 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -123,7 +123,7 @@ static int hpwdt_settimeout(struct watchdog_device *wdd, unsigned int val)
if (val <= wdd->pretimeout) {
dev_dbg(wdd->parent, "pretimeout < timeout. Setting to zero\n");
wdd->pretimeout = 0;
- pretimeout = 0;
+ pretimeout = false;
if (watchdog_active(wdd))
hpwdt_start(wdd);
}
@@ -336,13 +336,13 @@ static int hpwdt_init_one(struct pci_dev *dev,
watchdog_init_timeout(&hpwdt_dev, soft_margin, NULL);
if (is_kdump_kernel()) {
- pretimeout = 0;
+ pretimeout = false;
kdumptimeout = 0;
}
if (pretimeout && hpwdt_dev.timeout <= PRETIMEOUT_SEC) {
dev_warn(&dev->dev, "timeout <= pretimeout. Setting pretimeout to zero\n");
- pretimeout = 0;
+ pretimeout = false;
}
hpwdt_dev.pretimeout = pretimeout ? PRETIMEOUT_SEC : 0;
kdumptimeout = min(kdumptimeout, HPWDT_MAX_TIMER);