Skip to content

Commit 6070bf3

Browse files
Tetsuo HandaJames Morris
authored andcommitted
kernel: Constify temporary variable in roundup()
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]>
1 parent a7bcf21 commit 6070bf3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/kernel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ extern const char linux_proc_banner[];
6060
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
6161
#define roundup(x, y) ( \
6262
{ \
63-
typeof(y) __y = y; \
63+
const typeof(y) __y = y; \
6464
(((x) + (__y - 1)) / __y) * __y; \
6565
} \
6666
)

0 commit comments

Comments
 (0)