public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog: ebc-c384_wdt: Simplify ebc_c384_wdt_start timeout computation
@ 2016-05-11 13:05 William Breathitt Gray
  2016-05-11 13:43 ` Guenter Roeck
  0 siblings, 1 reply; 3+ messages in thread
From: William Breathitt Gray @ 2016-05-11 13:05 UTC (permalink / raw)
  To: wim, linux; +Cc: linux-watchdog, linux-kernel

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-11 13:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-11 13:05 [PATCH] watchdog: ebc-c384_wdt: Simplify ebc_c384_wdt_start timeout computation William Breathitt Gray
2016-05-11 13:43 ` Guenter Roeck
2016-05-11 13:58   ` William Breathitt Gray

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox