Skip to content

Commit 57b2b72

Browse files
nathanchancemasahir0y
authored andcommitted
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 <[email protected]> Reviewed-by: Miguel Ojeda <[email protected]> Reviewed-by: Mark Brown <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent df05c0e commit 57b2b72

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

include/linux/slab.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,7 @@ static __always_inline unsigned int __kmalloc_index(size_t size,
411411
if (size <= 16 * 1024 * 1024) return 24;
412412
if (size <= 32 * 1024 * 1024) return 25;
413413

414-
if ((IS_ENABLED(CONFIG_CC_IS_GCC) || CONFIG_CLANG_VERSION >= 110000)
415-
&& !IS_ENABLED(CONFIG_PROFILE_ALL_BRANCHES) && size_is_constant)
414+
if (!IS_ENABLED(CONFIG_PROFILE_ALL_BRANCHES) && size_is_constant)
416415
BUILD_BUG_ON_MSG(1, "unexpected size in kmalloc_index()");
417416
else
418417
BUG();

0 commit comments

Comments
 (0)