[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL v2 00/42] Rust, qdev, target/i386 changes for 2024-12-19
From: |
Paolo Bonzini |
Subject: |
Re: [PULL v2 00/42] Rust, qdev, target/i386 changes for 2024-12-19 |
Date: |
Thu, 19 Dec 2024 19:38:10 +0100 |
User-agent: |
Mozilla Thunderbird |
On 12/19/24 19:27, Richard Henderson wrote:
Please, really, replace my constify series with v2.
Sure, sorry about that. I squashed this difference in from v1's final result:
diff --git b/include/hw/qdev-core.h a/include/hw/qdev-core.h
index c404bf55550..e6ef80b7fd0 100644
--- b/include/hw/qdev-core.h
+++ a/include/hw/qdev-core.h
@@ -947,8 +947,8 @@ char *qdev_get_own_fw_dev_path_from_handler(BusState *bus,
DeviceState *dev);
* you attempt to add an existing property defined by a parent class.
* To modify an inherited property you need to use????
*
- * Validate that @props has at least one Property plus the terminator.
- * Validate that @props is an array via ARRAY_SIZE.
+ * Validate that @props has at least one Property.
+ * Validate that @props is an array, not a pointer, via ARRAY_SIZE.
* Validate that the array does not have a legacy terminator at compile-time;
* requires -O2 and the array to be const.
*/
and this one because otherwise clippy complains:
diff --git b/rust/qemu-api/src/device_class.rs
a/rust/qemu-api/src/device_class.rs
index cca51fe1a98..c98f0b2c7da 100644
--- b/rust/qemu-api/src/device_class.rs
+++ a/rust/qemu-api/src/device_class.rs
@@ -87,7 +87,7 @@ fn vmsd() -> Option<&'static VMStateDescription> {
dc.vmsd = vmsd;
}
let prop = <T as DeviceImpl>::properties();
- if prop.len() != 0 {
+ if !prop.is_empty() {
bindings::device_class_set_props_n(dc, prop.as_ptr(), prop.len());
}
}
Paolo
- [PULL v2 00/42] Rust, qdev, target/i386 changes for 2024-12-19, Paolo Bonzini, 2024/12/19
- [PULL 29/42] bql: add a "mock" BQL for Rust unit tests, Paolo Bonzini, 2024/12/19
- [PULL 30/42] rust: tests: allow writing more than one test, Paolo Bonzini, 2024/12/19
- Re: [PULL v2 00/42] Rust, qdev, target/i386 changes for 2024-12-19, Richard Henderson, 2024/12/19
- Re: [PULL v2 00/42] Rust, qdev, target/i386 changes for 2024-12-19,
Paolo Bonzini <=