[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1422702128-17354-1-git-send-email-der.herr@hofr.at>
Date: Sat, 31 Jan 2015 12:02:08 +0100
From: Nicholas Mc Guire <der.herr@...r.at>
To: Benjamin Romer <benjamin.romer@...sys.com>
Cc: David Kershner <david.kershner@...sys.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ken Cox <jkc@...hat.com>, sparmaintainer@...sys.com,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Nicholas Mc Guire <der.herr@...r.at>
Subject: [PATCH] staging: unisys: use msecs_to_jiffies for conversions
This is only an API consolidation to make things more readable.
Instances of var * HZ / 1000 are replaced by msecs_to_jiffies(var).
Signed-off-by: Nicholas Mc Guire <der.herr@...r.at>
---
Converting milliseconds to jiffies by "val * HZ / 1000" is technically
ok but msecs_to_jiffies(val) is the cleaner solution and handles all
corner cases correctly. This is a minor API cleanup only.
This patch was only compile tested with x86_64_defconfig + CONFIG_STAGING=y
CONFIG_UNISYSSPAR=y, CONFIG_UNISYS_VISORUTIL=m,
CONFIG_UNISYS_VISORCHANNEL=m, CONFIG_UNISYS_VISORCHIPSET=m
Patch is against 3.19.0-rc6 -next-20150129
drivers/staging/unisys/visorchipset/visorchipset_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c
index 82e259d..f606ee9 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
+++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
@@ -1594,7 +1594,7 @@ parahotplug_next_id(void)
static unsigned long
parahotplug_next_expiration(void)
{
- return jiffies + PARAHOTPLUG_TIMEOUT_MS * HZ / 1000;
+ return jiffies + msecs_to_jiffies(PARAHOTPLUG_TIMEOUT_MS);
}
/*
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists