diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2025-02-11 13:31:38 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-03-06 12:44:47 +0100 |
commit | 87f5c138363da28449835055299abbae57f39a19 (patch) | |
tree | 31a60924957c084a10443054a77b30100e03c505 /rust/hw | |
parent | 959fd759a2a55d90bf18f5b275cf6c7b11b27a79 (diff) | |
download | qemu-87f5c138363da28449835055299abbae57f39a19.zip qemu-87f5c138363da28449835055299abbae57f39a19.tar.gz qemu-87f5c138363da28449835055299abbae57f39a19.tar.bz2 |
rust: pl011: clean up visibilities of callbacks
Do not make callbacks unnecessarily "pub", they are only used
through function pointers.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/hw')
-rw-r--r-- | rust/hw/char/pl011/src/device.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/device.rs index 0154065..4cdbbf4 100644 --- a/rust/hw/char/pl011/src/device.rs +++ b/rust/hw/char/pl011/src/device.rs @@ -537,7 +537,7 @@ impl PL011State { } } - pub fn read(&self, offset: hwaddr, _size: u32) -> u64 { + fn read(&self, offset: hwaddr, _size: u32) -> u64 { match RegisterOffset::try_from(offset) { Err(v) if (0x3f8..0x400).contains(&(v >> 2)) => { let device_id = self.get_class().device_id; @@ -560,7 +560,7 @@ impl PL011State { } } - pub fn write(&self, offset: hwaddr, value: u64, _size: u32) { + fn write(&self, offset: hwaddr, value: u64, _size: u32) { let mut update_irq = false; if let Ok(field) = RegisterOffset::try_from(offset) { // qemu_chr_fe_write_all() calls into the can_receive @@ -621,7 +621,7 @@ impl PL011State { } } - pub fn realize(&self) { + fn realize(&self) { // SAFETY: self.char_backend has the correct size and alignment for a // CharBackend object, and its callbacks are of the correct types. unsafe { @@ -638,11 +638,11 @@ impl PL011State { } } - pub fn reset_hold(&self, _type: ResetType) { + fn reset_hold(&self, _type: ResetType) { self.regs.borrow_mut().reset(); } - pub fn update(&self) { + fn update(&self) { let regs = self.regs.borrow(); let flags = regs.int_level & regs.int_enabled; for (irq, i) in self.interrupts.iter().zip(IRQMASK) { |