]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
compiler-clang.h: Remove __cleanup -Wunused-variable workaround
authorNathan Chancellor <nathan@kernel.org>
Sun, 17 May 2026 23:05:18 +0000 (13:05 -1000)
committerNathan Chancellor <nathan@kernel.org>
Wed, 27 May 2026 22:20:06 +0000 (15:20 -0700)
Now that the minimum supported version of LLVM for building the kernel
has been raised to 17.0.1, the redefinition of __cleanup with
__maybe_unused added to it is unnecessary because the referenced LLVM
change is present in all supported LLVM versions. Drop it.

Link: https://patch.msgid.link/20260517-bump-minimum-supported-llvm-version-to-17-v2-15-b3b8cda46bdd@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
include/linux/compiler-clang.h

index e1123dd284862beaaa5aad91ca9d98319d1ad85c..eadf48b7b5b1ac3559bea146ddcc2afcfc12988f 100644 (file)
@@ -5,15 +5,6 @@
 
 /* Compiler specific definitions for Clang compiler */
 
-/*
- * Clang prior to 17 is being silly and considers many __cleanup() variables
- * as unused (because they are, their sole purpose is to go out of scope).
- *
- * https://github.com/llvm/llvm-project/commit/877210faa447f4cc7db87812f8ed80e398fedd61
- */
-#undef __cleanup
-#define __cleanup(func) __maybe_unused __attribute__((__cleanup__(func)))
-
 /* all clang versions usable with the kernel support KASAN ABI version 5 */
 #define KASAN_ABI_VERSION 5