We do not need to have CLK_NAME public nor a static. No functional change.
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
---
rust/hw/char/pl011/src/device.rs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/device.rs
index 57dc37dadef631fbccfa3049a3d8701b4e62b5b3..115786f9fa7f03c16cd44462cb7df5623ba3a6d7 100644
--- a/rust/hw/char/pl011/src/device.rs
+++ b/rust/hw/char/pl011/src/device.rs
@@ -152,6 +152,8 @@ impl ObjectImpl for PL011State {
/// location/instance. All its fields are expected to hold unitialized
/// values with the sole exception of `parent_obj`.
unsafe fn instance_init(&mut self) {
+ const CLK_NAME: &CStr = c"clk";
+
let dev = addr_of_mut!(*self).cast::<DeviceState>();
// SAFETY:
//
@@ -255,9 +257,6 @@ unsafe fn post_load(&mut self, _version_id: c_int) -> c_int {
}
}
-#[used]
-pub static CLK_NAME: &CStr = c"clk";
-
impl PL011State {
pub fn read(
&mut self,
--
2.45.2