linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Wim Van Sebroeck <wim@linux-watchdog.org>,
	Guenter Roeck <linux@roeck-us.net>,
	linux-watchdog@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de,
	Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH v5 2/7] watchdog: f71808e_wdt: remove superfluous global
Date: Mon,  9 Aug 2021 18:20:32 +0200	[thread overview]
Message-ID: <d1f8cda90283855633537adee0af2c6b00a9ec25.1628525954.git-series.a.fatoum@pengutronix.de> (raw)
In-Reply-To: <cover.3654d10d79751f1b01adc9403f9840543df4bcc4.1628525954.git-series.a.fatoum@pengutronix.de>

max_timeout never served any purpose over WATCHDOG_MAX_TIMEOUT, which it
was initialized with. Drop it.

Suggested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/watchdog/f71808e_wdt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/watchdog/f71808e_wdt.c b/drivers/watchdog/f71808e_wdt.c
index f7d82d261913..3a0b29cb5854 100644
--- a/drivers/watchdog/f71808e_wdt.c
+++ b/drivers/watchdog/f71808e_wdt.c
@@ -81,7 +81,6 @@ static unsigned short force_id;
 module_param(force_id, ushort, 0);
 MODULE_PARM_DESC(force_id, "Override the detected device ID");
 
-static const int max_timeout = WATCHDOG_MAX_TIMEOUT;
 static int timeout = WATCHDOG_TIMEOUT;	/* default timeout in seconds */
 module_param(timeout, int, 0);
 MODULE_PARM_DESC(timeout,
@@ -221,7 +220,7 @@ static inline void superio_exit(int base)
 static int watchdog_set_timeout(int timeout)
 {
 	if (timeout <= 0
-	 || timeout >  max_timeout) {
+	 || timeout >  WATCHDOG_MAX_TIMEOUT) {
 		pr_err("watchdog timeout out of range\n");
 		return -EINVAL;
 	}
@@ -720,7 +719,7 @@ static int __init watchdog_init(int sioaddr)
 
 	if (start_withtimeout) {
 		if (start_withtimeout <= 0
-		 || start_withtimeout >  max_timeout) {
+		 || start_withtimeout >  WATCHDOG_MAX_TIMEOUT) {
 			pr_err("starting timeout out of range\n");
 			err = -EINVAL;
 			goto exit_miscdev;
-- 
git-series 0.9.1

  parent reply	other threads:[~2021-08-09 16:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09 16:20 [PATCH v5 0/7] watchdog: f71808e_wdt: migrate to new kernel API Ahmad Fatoum
2021-08-09 16:20 ` [PATCH v5 1/7] watchdog: f71808e_wdt: fix inaccurate report in WDIOC_GETTIMEOUT Ahmad Fatoum
2021-08-09 16:20 ` Ahmad Fatoum [this message]
2021-08-28 16:07   ` [PATCH v5 2/7] watchdog: f71808e_wdt: remove superfluous global Guenter Roeck
2021-08-09 16:20 ` [PATCH v5 3/7] watchdog: f71808e_wdt: constify static array Ahmad Fatoum
2021-08-28 16:07   ` Guenter Roeck
2021-08-09 16:20 ` [PATCH v5 4/7] watchdog: f71808e_wdt: rename variant-independent identifiers appropriately Ahmad Fatoum
2021-08-09 16:20 ` [PATCH v5 5/7] watchdog: f71808e_wdt: migrate to new kernel watchdog API Ahmad Fatoum
2021-08-28 16:12   ` Guenter Roeck
2021-08-09 16:20 ` [PATCH v5 6/7] watchdog: f71808e_wdt: refactor to platform device/driver pair Ahmad Fatoum
2021-08-09 16:20 ` [PATCH v5 7/7] watchdog: f71808e_wdt: dynamically allocate watchdog driver data Ahmad Fatoum

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=d1f8cda90283855633537adee0af2c6b00a9ec25.1628525954.git-series.a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --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 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).