diff options
| author | John Hubbard <jhubbard@nvidia.com> | 2026-09-06 14:58:22 -0700 |
|---|---|---|
| committer | Miguel Ojeda <ojeda@kernel.org> | 2026-09-07 01:06:23 +0200 |
| commit | 2ac74c6db40adaa29c50cbb281ae9a6f63de18e1 (patch) | |
| tree | 40baed41f0a1aa399efcff1d5831998b2e4e0523 /scripts/basic/split-include.c | |
| parent | c6709d5e14072d0e3d02f291daee46a199e5dad3 (diff) | |
| download | linux-stable-2ac74c6db40adaa29c50cbb281ae9a6f63de18e1.tar.gz linux-stable-2ac74c6db40adaa29c50cbb281ae9a6f63de18e1.zip | |
rust: allow `clippy::as_underscore` in the generated bindings
A CLIPPY=1 build emitted about 15000 `as _` conversion warnings, all of
them in bindgen's generated output and none in hand-written code.
[ The lint messages look like:
error: using `as _` conversion
--> rust/bindings/bindings_generated.rs:18947:9
|
18947 | self._bitfield_1.get_const::<0usize, 16u8>() as u32 as _
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
| |
| help: consider giving the type explicitly: `u32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#as_underscore
= note: `-D clippy::as-underscore` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::as_underscore)]`
- Miguel ]
bindgen 0.73 returns each bitfield read through a trailing `as _`, and
0.72 returns it through a transmute, which the lint ignores. The
bindings and uapi crates allow `clippy::all` over the generated code.
That group does not cover `clippy::as_underscore`, a restriction lint.
Allow `clippy::as_underscore` by name in the bindings and uapi crates.
Assisted-by: LLM
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Link: https://patch.msgid.link/20260906215822.1201022-1-jhubbard@nvidia.com
Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs).
[ Removed CI sentence. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions
