From: <yuechao.zhao@advantech.com.cn>
To: <345351830@qq.com>
Cc: <amy.shih@advantech.com.tw>, <oakley.ding@advantech.com.tw>,
<jia.sui@advantech.com.cn>,
Yuechao Zhao <yuechao.zhao@advantech.com.cn>,
Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>, <linux-hwmon@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: [v1,1/1 2/2] Set the default timeout
Date: Wed, 27 May 2020 01:18:39 +0000 [thread overview]
Message-ID: <1590542319-35736-2-git-send-email-yuechao.zhao@advantech.com.cn> (raw)
In-Reply-To: <1590542319-35736-1-git-send-email-yuechao.zhao@advantech.com.cn>
From: Yuechao Zhao <yuechao.zhao@advantech.com.cn>
The timeout module parameter should not be used for setting the default
timeout. Because, if you set the timeout = 0, the default timeout will
be meaningless. And the wahtchdog_init_timeout() can not detect this
error because the timeout module parameter of 0 means "no timeout
module paraameter specified".
Signed-off-by: Yuechao Zhao <yuechao.zhao@advantech.com.cn>
---
drivers/hwmon/nct7904.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/nct7904.c b/drivers/hwmon/nct7904.c
index d069d59..ddbe47e 100644
--- a/drivers/hwmon/nct7904.c
+++ b/drivers/hwmon/nct7904.c
@@ -1147,7 +1147,7 @@ static int nct7904_probe(struct i2c_client *client,
data->wdt.ops = &nct7904_wdt_ops;
data->wdt.info = &nct7904_wdt_info;
- data->wdt.timeout = timeout * 60; /* in seconds */
+ data->wdt.timeout = WATCHDOG_TIMEOUT * 60; /* Set default timeout */
data->wdt.min_timeout = MIN_TIMEOUT;
data->wdt.max_timeout = MAX_TIMEOUT;
data->wdt.parent = &client->dev;
--
1.8.3.1
next prev parent reply other threads:[~2020-05-27 1:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-27 1:18 [v1,1/1 1/2] Check the timeout module parameter is in the min-max range yuechao.zhao
2020-05-27 1:18 ` yuechao.zhao [this message]
2020-05-27 1:46 ` [v1,1/1 2/2] Set the default timeout Guenter Roeck
2020-05-27 1:42 ` [v1,1/1 1/2] Check the timeout module parameter is in the min-max range Guenter Roeck
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=1590542319-35736-2-git-send-email-yuechao.zhao@advantech.com.cn \
--to=yuechao.zhao@advantech.com.cn \
--cc=345351830@qq.com \
--cc=amy.shih@advantech.com.tw \
--cc=jdelvare@suse.com \
--cc=jia.sui@advantech.com.cn \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=oakley.ding@advantech.com.tw \
/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).