Skip to content

Commit 499914e

Browse files
author
Sven Van Asbroeck
committed
rust/arm 32-bit: remove guard for rust-bindgen bug
On 32-bit arm, `size_t` and 'uintptr_t` are incompatible, which will trigger the static assertion. The bug which this guard protects against (rust-lang/rust-bindgen#1671) was fixed upstream as of rust-bindgen v0.53: rust-lang/rust-bindgen#1688 d650823839f7 ("Remove size_t to usize conversion") The current recommended rust-bindgen version for building the Linux kernel is v0.56, so the guard can be safely dropped. Out of an abundance of caution, remove the guard only if building for 32-bit arm. Signed-off-by: Sven Van Asbroeck <[email protected]>
1 parent 123a8db commit 499914e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rust/helpers.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ void rust_helper_kunmap(struct page *page)
8181
}
8282
EXPORT_SYMBOL_GPL(rust_helper_kunmap);
8383

84+
#if !defined(CONFIG_ARM)
8485
// See https://github.com/rust-lang/rust-bindgen/issues/1671
8586
static_assert(__builtin_types_compatible_p(size_t, uintptr_t),
8687
"size_t must match uintptr_t, what architecture is this??");
88+
#endif

0 commit comments

Comments
 (0)