summary refs log tree commit diff stats
path: root/rust/hw/char/pl011/src
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-02-11 13:31:38 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2025-03-06 12:44:47 +0100
commit87f5c138363da28449835055299abbae57f39a19 (patch)
tree31a60924957c084a10443054a77b30100e03c505 /rust/hw/char/pl011/src
parent959fd759a2a55d90bf18f5b275cf6c7b11b27a79 (diff)
downloadfocaccia-qemu-87f5c138363da28449835055299abbae57f39a19.tar.gz
focaccia-qemu-87f5c138363da28449835055299abbae57f39a19.zip
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/char/pl011/src')
-rw-r--r--rust/hw/char/pl011/src/device.rs10
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 01540654cc..4cdbbf4b73 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) {