From: William Breathitt Gray <vilhelm.gray@gmail.com>
To: wim@iguana.be, linux@roeck-us.net
Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] watchdog: ebc-c384_wdt: Simplify ebc_c384_wdt_start timeout computation
Date: Wed, 11 May 2016 09:05:51 -0400 [thread overview]
Message-ID: <20160511130551.GA16032@sophia> (raw)
The ebc_c384_wdt_set_timeout function already rounds up timeout values
greater than 255 to a multiple of 60, so there is no need to round again
in the ebc_c384_wdt_start function; a timeout value greater than 255 in
ebc_c384_wdt_start will divide cleanly by 60.
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---
drivers/watchdog/ebc-c384_wdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/watchdog/ebc-c384_wdt.c b/drivers/watchdog/ebc-c384_wdt.c
index 77fda0b..948e687 100644
--- a/drivers/watchdog/ebc-c384_wdt.c
+++ b/drivers/watchdog/ebc-c384_wdt.c
@@ -51,7 +51,7 @@ static int ebc_c384_wdt_start(struct watchdog_device *wdev)
/* resolution is in minutes for timeouts greater than 255 seconds */
if (t > 255)
- t = DIV_ROUND_UP(t, 60);
+ t /= 60;
outb(t, PET_ADDR);
--
2.7.3
next reply other threads:[~2016-05-11 13:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 13:05 William Breathitt Gray [this message]
2016-05-11 13:43 ` [PATCH] watchdog: ebc-c384_wdt: Simplify ebc_c384_wdt_start timeout computation Guenter Roeck
2016-05-11 13:58 ` William Breathitt Gray
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=20160511130551.GA16032@sophia \
--to=vilhelm.gray@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=wim@iguana.be \
/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.