Skip to content

Commit

Permalink
[PATCH] Add parentheses around arguments in the SH_DIV macro.
Browse files Browse the repository at this point in the history
There is currently no affected user in the tree, but usage is less
surprising that way.

Signed-off-by: Uwe Zeisberger <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Uwe Zeisberger authored and Linus Torvalds committed Jul 31, 2006
1 parent 3c829c3 commit 0d94df5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/jiffies.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 0d94df5

Please sign in to comment.