[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20060726093308.GA23035@digi.com>
Date: Wed, 26 Jul 2006 11:33:09 +0200
From: Uwe Zeisberger <Uwe_Zeisberger@...i.com>
To: linux-kernel@...r.kernel.org
Subject: [PATCH] Add parenthesis around arguments in the SH_DIV macro.
There is currently no affected user in the tree, but
usage is less surprising that way.
Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@...i.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
-
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