aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBernhard Beschow <shentey@gmail.com>2023-02-13 17:20:02 +0100
committerMichael S. Tsirkin <mst@redhat.com>2023-05-19 10:30:46 -0400
commit9e57b81861e05b2856ed1c4fbc2d991801c7c777 (patch)
tree5858d3a24fa899e9f6e362178d85ae944a1e7ee5 /include
parentf9fddaf7ce26acc48fc899673affe957103862a5 (diff)
downloadqemu-9e57b81861e05b2856ed1c4fbc2d991801c7c777.zip
qemu-9e57b81861e05b2856ed1c4fbc2d991801c7c777.tar.gz
qemu-9e57b81861e05b2856ed1c4fbc2d991801c7c777.tar.bz2
hw/pci-host/pam: Make init_pam() usage more readable
Unlike pam_update() which takes the subject -- PAMMemoryRegion -- as first argument, init_pam() takes it as fifth (!) argument. This makes it quite hard to figure out what an init_pam() invocation actually initializes. By moving the subject to the front this should become clearer. While at it, lower the DeviceState parameter to Object, also communicating more clearly that this parameter is just the owner rather than some (heavy?) dependency. Signed-off-by: Bernhard Beschow <shentey@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230213162004.2797-8-shentey@gmail.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/pci-host/pam.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/hw/pci-host/pam.h b/include/hw/pci-host/pam.h
index c1fd06b..005916f 100644
--- a/include/hw/pci-host/pam.h
+++ b/include/hw/pci-host/pam.h
@@ -87,8 +87,9 @@ typedef struct PAMMemoryRegion {
unsigned current;
} PAMMemoryRegion;
-void init_pam(DeviceState *dev, MemoryRegion *ram, MemoryRegion *system,
- MemoryRegion *pci, PAMMemoryRegion *mem, uint32_t start, uint32_t size);
+void init_pam(PAMMemoryRegion *mem, Object *owner, MemoryRegion *ram,
+ MemoryRegion *system, MemoryRegion *pci,
+ uint32_t start, uint32_t size);
void pam_update(PAMMemoryRegion *mem, int idx, uint8_t val);
#endif /* QEMU_PAM_H */