diff options
author | Nathan Chancellor <nathan@kernel.org> | 2021-11-29 09:57:59 -0700 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2021-12-02 17:24:51 +0900 |
commit | 57b2b72ac1fc5d55cf3b13207942c109f1a65cb5 (patch) | |
tree | 6d124252910a9aaa1712e6c593dcac89b21ba5c6 | |
parent | df05c0e9496ce1e28b51f79f9fae94479a37fa60 (diff) | |
download | linux-57b2b72ac1fc5d55cf3b13207942c109f1a65cb5.tar.bz2 |
mm, slab: Remove compiler check in __kmalloc_index
The minimum supported version of LLVM has been raised to 11.0.0, meaning
this check is always true, so it can be dropped.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
-rw-r--r-- | include/linux/slab.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h index 181045148b06..d3fb5ac71c24 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -411,8 +411,7 @@ static __always_inline unsigned int __kmalloc_index(size_t size, if (size <= 16 * 1024 * 1024) return 24; if (size <= 32 * 1024 * 1024) return 25; - if ((IS_ENABLED(CONFIG_CC_IS_GCC) || CONFIG_CLANG_VERSION >= 110000) - && !IS_ENABLED(CONFIG_PROFILE_ALL_BRANCHES) && size_is_constant) + if (!IS_ENABLED(CONFIG_PROFILE_ALL_BRANCHES) && size_is_constant) BUILD_BUG_ON_MSG(1, "unexpected size in kmalloc_index()"); else BUG(); |