History

include/linux/log2.h: add missing () around n in roundup_pow_of_two()

Otherwise gcc generates warnings if the expression is complicated.

Jason Gunthorpe committed 6 years ago

Commit 428fc0a1 parent e5a59d31 file · +1 −1Browse files

Unified · Split

include/linux/log2.h+1−1
@@ -173,7 +173,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) · 172 unmodified lines
173#define roundup_pow_of_two(n) \173#define roundup_pow_of_two(n) \
174( \174( \
175 __builtin_constant_p(n) ? ( \175 __builtin_constant_p(n) ? ( \
176 (n == 1) ? 1 : \176 ((n) == 1) ? 1 : \
177 (1UL << (ilog2((n) - 1) + 1)) \177 (1UL << (ilog2((n) - 1) + 1)) \
178 ) : \178 ) : \
179 __roundup_pow_of_two(n) \179 __roundup_pow_of_two(n) \