mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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>
This commit is contained in:
parent
f9fddaf7ce
commit
9e57b81861
4 changed files with 18 additions and 17 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue