* [PATCH] Add parenthesis around arguments in the SH_DIV macro.
@ 2006-07-26 9:33 Uwe Zeisberger
0 siblings, 0 replies; only message in thread
From: Uwe Zeisberger @ 2006-07-26 9:33 UTC (permalink / raw)
To: linux-kernel
There is currently no affected user in the tree, but
usage is less surprising that way.
Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
---
include/linux/jiffies.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
index 0433769..329ebcf 100644
--- a/include/linux/jiffies.h
+++ b/include/linux/jiffies.h
@@ -47,8 +47,8 @@ #define LATCH_HPET ((HPET_TICK_RATE + HZ
* - (NOM / DEN) fits in (32 - LSH) bits.
* - (NOM % DEN) fits in (32 - LSH) bits.
*/
-#define SH_DIV(NOM,DEN,LSH) ( ((NOM / DEN) << LSH) \
- + (((NOM % DEN) << LSH) + DEN / 2) / DEN)
+#define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) \
+ + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN))
/* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */
#define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8))
--
1.4.2.rc1.g83e1
--
Uwe Zeisberger
FS Forth-Systeme GmbH, A Digi International Company
Kueferstrasse 8, D-79206 Breisach, Germany
Phone: +49 (7667) 908 0 Fax: +49 (7667) 908 200
Web: www.fsforth.de, www.digi.com
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-07-26 9:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-26 9:33 [PATCH] Add parenthesis around arguments in the SH_DIV macro Uwe Zeisberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox