mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] compiler_types: drop the Rust bindgen workaround for BTF_TYPE_TAG()
@ 2026-11-07  2:46 Thomas Weißschuh
  0 siblings, 0 replies; only message in thread
From: Thomas Weißschuh @ 2026-11-07  2:46 UTC (permalink / raw)
  To: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	Danilo Krummrich, Daniel Almeida, Tamir Duberstein,
	Alexandre Courbot, Onur Özkan
  Cc: linux-kernel, rust-for-linux, Thomas Weißschuh

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@weissschuh.net>
---
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@weissschuh.net
---
 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@weissschuh.net>


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-07  2:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-07  2:46 [PATCH v2] compiler_types: drop the Rust bindgen workaround for BTF_TYPE_TAG() Thomas Weißschuh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®