* [PATCH] rust: bindings: disable more clippy warnings
@ 2026-09-08 17:38 Paolo Bonzini
2026-09-09 6:21 ` Zhao Liu
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2026-09-08 17:38 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-rust, Peter Maydell
The clippy::complexity category includes manual_div_ceil, which triggers
with e.g. bindgen 0.73.2. It is not really relevant to automatically
generated code so drop it from all bindgen crates, but keep it
enabled on purpose for other code.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
Cargo.toml | 1 +
rust/bindings/chardev-sys/lib.rs | 1 +
rust/bindings/hwcore-sys/lib.rs | 1 +
rust/bindings/migration-sys/lib.rs | 1 +
rust/bindings/qom-sys/lib.rs | 1 +
rust/bindings/system-sys/lib.rs | 1 +
rust/bindings/util-sys/lib.rs | 1 +
7 files changed, 7 insertions(+)
diff --git a/Cargo.toml b/Cargo.toml
index 397a64ea99b..b6b6d97dfec 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -47,6 +47,7 @@ redundant_explicit_links = "deny"
# default-warn lints
result_unit_err = "allow"
manual_checked_ops = "deny"
+manual_div_ceil = "deny"
should_implement_trait = "deny"
# can be for a reason, e.g. in callbacks
unused_self = "allow"
diff --git a/rust/bindings/chardev-sys/lib.rs b/rust/bindings/chardev-sys/lib.rs
index 903f6fc492a..61c19412b07 100644
--- a/rust/bindings/chardev-sys/lib.rs
+++ b/rust/bindings/chardev-sys/lib.rs
@@ -8,6 +8,7 @@
non_upper_case_globals,
unnecessary_transmutes,
unsafe_op_in_unsafe_fn,
+ clippy::complexity,
clippy::pedantic,
clippy::restriction,
clippy::style,
diff --git a/rust/bindings/hwcore-sys/lib.rs b/rust/bindings/hwcore-sys/lib.rs
index 8cef4a79619..cecbf808dd0 100644
--- a/rust/bindings/hwcore-sys/lib.rs
+++ b/rust/bindings/hwcore-sys/lib.rs
@@ -8,6 +8,7 @@
non_upper_case_globals,
unnecessary_transmutes,
unsafe_op_in_unsafe_fn,
+ clippy::complexity,
clippy::pedantic,
clippy::restriction,
clippy::style,
diff --git a/rust/bindings/migration-sys/lib.rs b/rust/bindings/migration-sys/lib.rs
index c8397dc8974..4d13dc3cb2b 100644
--- a/rust/bindings/migration-sys/lib.rs
+++ b/rust/bindings/migration-sys/lib.rs
@@ -8,6 +8,7 @@
non_upper_case_globals,
unnecessary_transmutes,
unsafe_op_in_unsafe_fn,
+ clippy::complexity,
clippy::pedantic,
clippy::restriction,
clippy::style,
diff --git a/rust/bindings/qom-sys/lib.rs b/rust/bindings/qom-sys/lib.rs
index 21b996aeaa4..6b5c562951d 100644
--- a/rust/bindings/qom-sys/lib.rs
+++ b/rust/bindings/qom-sys/lib.rs
@@ -8,6 +8,7 @@
non_upper_case_globals,
unnecessary_transmutes,
unsafe_op_in_unsafe_fn,
+ clippy::complexity,
clippy::pedantic,
clippy::restriction,
clippy::style,
diff --git a/rust/bindings/system-sys/lib.rs b/rust/bindings/system-sys/lib.rs
index 30adf683c35..2dd5c7fc926 100644
--- a/rust/bindings/system-sys/lib.rs
+++ b/rust/bindings/system-sys/lib.rs
@@ -8,6 +8,7 @@
non_upper_case_globals,
unnecessary_transmutes,
unsafe_op_in_unsafe_fn,
+ clippy::complexity,
clippy::pedantic,
clippy::restriction,
clippy::style,
diff --git a/rust/bindings/util-sys/lib.rs b/rust/bindings/util-sys/lib.rs
index 0212e941843..f78064e52cd 100644
--- a/rust/bindings/util-sys/lib.rs
+++ b/rust/bindings/util-sys/lib.rs
@@ -8,6 +8,7 @@
non_upper_case_globals,
unnecessary_transmutes,
unsafe_op_in_unsafe_fn,
+ clippy::complexity,
clippy::pedantic,
clippy::restriction,
clippy::style,
--
2.55.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rust: bindings: disable more clippy warnings
2026-09-08 17:38 [PATCH] rust: bindings: disable more clippy warnings Paolo Bonzini
@ 2026-09-09 6:21 ` Zhao Liu
0 siblings, 0 replies; 2+ messages in thread
From: Zhao Liu @ 2026-09-09 6:21 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, qemu-rust, Peter Maydell
On Tue, Sep 08, 2026 at 07:38:26PM +0200, Paolo Bonzini wrote:
> Date: Tue, 8 Sep 2026 19:38:26 +0200
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: [PATCH] rust: bindings: disable more clippy warnings
> X-Mailer: git-send-email 2.55.0
>
> The clippy::complexity category includes manual_div_ceil, which triggers
> with e.g. bindgen 0.73.2. It is not really relevant to automatically
> generated code so drop it from all bindgen crates, but keep it
> enabled on purpose for other code.
>
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> Cargo.toml | 1 +
> rust/bindings/chardev-sys/lib.rs | 1 +
> rust/bindings/hwcore-sys/lib.rs | 1 +
> rust/bindings/migration-sys/lib.rs | 1 +
> rust/bindings/qom-sys/lib.rs | 1 +
> rust/bindings/system-sys/lib.rs | 1 +
> rust/bindings/util-sys/lib.rs | 1 +
> 7 files changed, 7 insertions(+)
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-09 6:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-08 17:38 [PATCH] rust: bindings: disable more clippy warnings Paolo Bonzini
2026-09-09 6:21 ` Zhao Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox