From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-rust@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Subject: [PATCH] rust: bindings: disable more clippy warnings
Date: Tue, 8 Sep 2026 19:38:26 +0200 [thread overview]
Message-ID: <20260908173826.867616-1-pbonzini@redhat.com> (raw)
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
next reply other threads:[~2026-09-08 17:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 17:38 Paolo Bonzini [this message]
2026-09-09 6:21 ` [PATCH] rust: bindings: disable more clippy warnings Zhao Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260908173826.867616-1-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-rust@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.