[PATCH v2] compiler_types: drop the Rust bindgen workaround for BTF_TYPE_TAG()

From: Thomas Weißschuh

Date: Fri Nov 06 2026 - 21:46:42 EST


The referenced bug was fixed back in bindgen v0.61.0.
As the current minimal supported version of bindgen in the kernel is
v0.71.1 the workaround is not necessary anymore.

Drop the workaround.

Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
---
Changes in v2:
- Mention bindgen v0.61.0 as first fixed version.
- Rebase on current rust-next.
- Link to v1: https://patch.msgid.link/20261017-rust-bindgen-workaround-v1-1-fbd99504b4b9@xxxxxxxxxxxxxx
---
include/linux/compiler_types.h | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index c5921f139007..cdae5823c915 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -30,12 +30,8 @@
# define auto __auto_type
#endif

-/*
- * Skipped when running bindgen due to a libclang issue;
- * see https://github.com/rust-lang/rust-bindgen/issues/2244.
- */
#if defined(CONFIG_DEBUG_INFO_BTF) && defined(CONFIG_PAHOLE_HAS_BTF_TAG) && \
- __has_attribute(btf_type_tag) && !defined(__BINDGEN__)
+ __has_attribute(btf_type_tag)
# define BTF_TYPE_TAG(value) __attribute__((btf_type_tag(#value)))
#else
# define BTF_TYPE_TAG(value) /* nothing */

---
base-commit: d89e1d186ec9271bf78e62771779e9fc03bf0fc3
change-id: 20261107-rust-bindgen-workaround-ddc7de1cbda9

Best regards,
--
Thomas Weißschuh <linux@xxxxxxxxxxxxxx>