OSDN Git Service

hw/pci-host/pam: Make init_pam() usage more readable
authorBernhard Beschow <shentey@gmail.com>
Mon, 13 Feb 2023 16:20:02 +0000 (17:20 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 19 May 2023 14:30:46 +0000 (10:30 -0400)
commit9e57b81861e05b2856ed1c4fbc2d991801c7c777
tree5858d3a24fa899e9f6e362178d85ae944a1e7ee5
parentf9fddaf7ce26acc48fc899673affe957103862a5
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>
hw/pci-host/i440fx.c
hw/pci-host/pam.c
hw/pci-host/q35.c
include/hw/pci-host/pam.h