Skip to content

Commit

Permalink
kernel: Constify temporary variable in roundup()
Browse files Browse the repository at this point in the history
Fix build error with GCC 3.x caused by commit b28efd5
"kernel: roundup should only reference arguments once" by constifying
temporary variable used in that macro.

Signed-off-by: Tetsuo Handa <[email protected]>
Suggested-by: Andrew Morton <[email protected]>
Acked-by: Eric Paris <[email protected]>
Signed-off-by: James Morris <[email protected]>
  • Loading branch information
Tetsuo Handa authored and James Morris committed Nov 9, 2010
1 parent a7bcf21 commit 6070bf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ extern const char linux_proc_banner[];
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
#define roundup(x, y) ( \
{ \
typeof(y) __y = y; \
const typeof(y) __y = y; \
(((x) + (__y - 1)) / __y) * __y; \
} \
)
Expand Down

0 comments on commit 6070bf3

Please sign in to comment.