summaryrefslogtreecommitdiffstats
path: root/include/linux/jiffies.h
diff options
context:
space:
mode:
authorUwe Zeisberger2006-07-30 12:04:02 +0200
committerLinus Torvalds2006-07-31 22:28:43 +0200
commit0d94df56963251d896e87c6197f6df132593232b (patch)
tree2b87f030b4e591e63a8a1d1c636145030e221660 /include/linux/jiffies.h
parent[PATCH] Reducing local_bh_enable/disable overhead in irqtrace (diff)
downloadkernel-qcow2-linux-0d94df56963251d896e87c6197f6df132593232b.tar.gz
kernel-qcow2-linux-0d94df56963251d896e87c6197f6df132593232b.tar.xz
kernel-qcow2-linux-0d94df56963251d896e87c6197f6df132593232b.zip
[PATCH] Add parentheses 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@digi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/jiffies.h')
-rw-r--r--include/linux/jiffies.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
index 043376920f51..329ebcffa106 100644
--- a/include/linux/jiffies.h
+++ b/include/linux/jiffies.h
@@ -47,8 +47,8 @@
* - (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))