提交 6070bf35 编写于 作者: T Tetsuo Handa 提交者: James Morris

kernel: Constify temporary variable in roundup()

Fix build error with GCC 3.x caused by commit b28efd54
"kernel: roundup should only reference arguments once" by constifying
temporary variable used in that macro.
Signed-off-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Suggested-by: NAndrew Morton <akpm@linux-foundation.org>
Acked-by: NEric Paris <eparis@redhat.com>
Signed-off-by: NJames Morris <jmorris@namei.org>
上级 a7bcf21e
......@@ -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; \
} \
)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册