Message ID | 1525179614-14571-6-git-send-email-changbin.du@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/include/asm-generic/fixmap.h b/include/asm-generic/fixmap.h index 827e4d3..a6576d4 100644 --- a/include/asm-generic/fixmap.h +++ b/include/asm-generic/fixmap.h @@ -28,7 +28,8 @@ */ static __always_inline unsigned long fix_to_virt(const unsigned int idx) { - BUILD_BUG_ON(idx >= __end_of_fixed_addresses); + BUILD_BUG_ON(__builtin_constant_p(idx) && + idx >= __end_of_fixed_addresses); return __fix_to_virt(idx); }