From: Uwe Zeisberger Date: Sun, 30 Jul 2006 10:04:02 +0000 (-0700) Subject: [PATCH] Add parentheses around arguments in the SH_DIV macro. X-Git-Tag: v2.6.18-rc4~96 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d94df56963251d896e87c6197f6df132593232b;p=platform%2Fkernel%2Flinux-3.10.git [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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 @@ * - (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))