From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Eric Auger" <eric.auger@redhat.com>
Subject: [PULL 25/27] vfio: Rename PCI_VFIO to VFIO_PCI
Date: Thu, 3 Sep 2020 16:52:45 -0400 [thread overview]
Message-ID: <20200903205247.1667472-26-ehabkost@redhat.com> (raw)
In-Reply-To: <20200903205247.1667472-1-ehabkost@redhat.com>
Make the type checking macro name consistent with the TYPE_*
constant.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <20200902224311.1321159-56-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/vfio/pci.h | 2 +-
hw/vfio/pci.c | 22 +++++++++++-----------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h
index 846d60e56c..5e53d5b863 100644
--- a/hw/vfio/pci.h
+++ b/hw/vfio/pci.h
@@ -116,7 +116,7 @@ typedef struct VFIOMSIXInfo {
#define TYPE_VFIO_PCI "vfio-pci"
typedef struct VFIOPCIDevice VFIOPCIDevice;
-DECLARE_INSTANCE_CHECKER(VFIOPCIDevice, PCI_VFIO,
+DECLARE_INSTANCE_CHECKER(VFIOPCIDevice, VFIO_PCI,
TYPE_VFIO_PCI)
struct VFIOPCIDevice {
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 3611dcd38b..0d83eb0e47 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -230,7 +230,7 @@ static void vfio_intx_update(VFIOPCIDevice *vdev, PCIINTxRoute *route)
static void vfio_intx_routing_notifier(PCIDevice *pdev)
{
- VFIOPCIDevice *vdev = PCI_VFIO(pdev);
+ VFIOPCIDevice *vdev = VFIO_PCI(pdev);
PCIINTxRoute route;
if (vdev->interrupt != VFIO_INT_INTx) {
@@ -456,7 +456,7 @@ static void vfio_update_kvm_msi_virq(VFIOMSIVector *vector, MSIMessage msg,
static int vfio_msix_vector_do_use(PCIDevice *pdev, unsigned int nr,
MSIMessage *msg, IOHandler *handler)
{
- VFIOPCIDevice *vdev = PCI_VFIO(pdev);
+ VFIOPCIDevice *vdev = VFIO_PCI(pdev);
VFIOMSIVector *vector;
int ret;
@@ -541,7 +541,7 @@ static int vfio_msix_vector_use(PCIDevice *pdev,
static void vfio_msix_vector_release(PCIDevice *pdev, unsigned int nr)
{
- VFIOPCIDevice *vdev = PCI_VFIO(pdev);
+ VFIOPCIDevice *vdev = VFIO_PCI(pdev);
VFIOMSIVector *vector = &vdev->msi_vectors[nr];
trace_vfio_msix_vector_release(vdev->vbasedev.name, nr);
@@ -1048,7 +1048,7 @@ static const MemoryRegionOps vfio_vga_ops = {
*/
static void vfio_sub_page_bar_update_mapping(PCIDevice *pdev, int bar)
{
- VFIOPCIDevice *vdev = PCI_VFIO(pdev);
+ VFIOPCIDevice *vdev = VFIO_PCI(pdev);
VFIORegion *region = &vdev->bars[bar].region;
MemoryRegion *mmap_mr, *region_mr, *base_mr;
PCIIORegion *r;
@@ -1094,7 +1094,7 @@ static void vfio_sub_page_bar_update_mapping(PCIDevice *pdev, int bar)
*/
uint32_t vfio_pci_read_config(PCIDevice *pdev, uint32_t addr, int len)
{
- VFIOPCIDevice *vdev = PCI_VFIO(pdev);
+ VFIOPCIDevice *vdev = VFIO_PCI(pdev);
uint32_t emu_bits = 0, emu_val = 0, phys_val = 0, val;
memcpy(&emu_bits, vdev->emulated_config_bits + addr, len);
@@ -1127,7 +1127,7 @@ uint32_t vfio_pci_read_config(PCIDevice *pdev, uint32_t addr, int len)
void vfio_pci_write_config(PCIDevice *pdev,
uint32_t addr, uint32_t val, int len)
{
- VFIOPCIDevice *vdev = PCI_VFIO(pdev);
+ VFIOPCIDevice *vdev = VFIO_PCI(pdev);
uint32_t val_le = cpu_to_le32(val);
trace_vfio_pci_write_config(vdev->vbasedev.name, addr, val, len);
@@ -2701,7 +2701,7 @@ static void vfio_unregister_req_notifier(VFIOPCIDevice *vdev)
static void vfio_realize(PCIDevice *pdev, Error **errp)
{
- VFIOPCIDevice *vdev = PCI_VFIO(pdev);
+ VFIOPCIDevice *vdev = VFIO_PCI(pdev);
VFIODevice *vbasedev_iter;
VFIOGroup *group;
char *tmp, *subsys, group_path[PATH_MAX], *group_name;
@@ -3033,7 +3033,7 @@ error:
static void vfio_instance_finalize(Object *obj)
{
- VFIOPCIDevice *vdev = PCI_VFIO(obj);
+ VFIOPCIDevice *vdev = VFIO_PCI(obj);
VFIOGroup *group = vdev->vbasedev.group;
vfio_display_finalize(vdev);
@@ -3057,7 +3057,7 @@ static void vfio_instance_finalize(Object *obj)
static void vfio_exitfn(PCIDevice *pdev)
{
- VFIOPCIDevice *vdev = PCI_VFIO(pdev);
+ VFIOPCIDevice *vdev = VFIO_PCI(pdev);
vfio_unregister_req_notifier(vdev);
vfio_unregister_err_notifier(vdev);
@@ -3075,7 +3075,7 @@ static void vfio_exitfn(PCIDevice *pdev)
static void vfio_pci_reset(DeviceState *dev)
{
- VFIOPCIDevice *vdev = PCI_VFIO(dev);
+ VFIOPCIDevice *vdev = VFIO_PCI(dev);
trace_vfio_pci_reset(vdev->vbasedev.name);
@@ -3115,7 +3115,7 @@ post_reset:
static void vfio_instance_init(Object *obj)
{
PCIDevice *pci_dev = PCI_DEVICE(obj);
- VFIOPCIDevice *vdev = PCI_VFIO(obj);
+ VFIOPCIDevice *vdev = VFIO_PCI(obj);
device_add_bootindex_property(obj, &vdev->bootindex,
"bootindex", NULL,
--
2.26.2
next prev parent reply other threads:[~2020-09-03 21:18 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-03 20:52 [PULL 00/27] QOM boilerplate cleanup Eduardo Habkost
2020-09-03 20:52 ` [PULL 01/27] qom: make object_ref/unref use a void * instead of Object * Eduardo Habkost
2020-09-03 20:52 ` [PULL 02/27] qom: provide convenient macros for declaring and defining types Eduardo Habkost
2020-09-03 20:52 ` [PULL 03/27] qom: Allow class type name to be specified in OBJECT_DECLARE* Eduardo Habkost
2020-09-03 20:52 ` [PULL 04/27] qom: DECLARE_*_CHECKERS macros Eduardo Habkost
2020-09-03 20:52 ` [PULL 05/27] qom: Make type checker functions accept const pointers Eduardo Habkost
2020-09-03 20:52 ` [PULL 06/27] codeconverter: script for automating QOM code cleanups Eduardo Habkost
2020-09-03 20:52 ` [PULL 07/27] Delete duplicate QOM typedefs Eduardo Habkost
2020-09-03 20:52 ` [PULL 08/27] Move QOM typedefs and add missing includes Eduardo Habkost
2020-09-03 20:52 ` [PULL 09/27] Use DECLARE_*CHECKER* macros Eduardo Habkost
2020-09-03 20:52 ` [PULL 10/27] Use DECLARE_*CHECKER* when possible (--force mode) Eduardo Habkost
2020-09-03 20:52 ` [PULL 11/27] Use OBJECT_DECLARE_TYPE where possible Eduardo Habkost
2020-09-03 20:52 ` [PULL 12/27] Use OBJECT_DECLARE_SIMPLE_TYPE when possible Eduardo Habkost
2020-09-03 20:52 ` [PULL 13/27] gpex: Fix type checking function name Eduardo Habkost
2020-09-03 20:52 ` [PULL 14/27] chardev: Rename TYPE_CHARDEV_* to TYPE_*_CHARDEV Eduardo Habkost
2020-09-03 20:52 ` [PULL 15/27] ap-device: Rename AP_DEVICE_TYPE to TYPE_AP_DEVICE Eduardo Habkost
2020-09-03 20:52 ` [PULL 16/27] dev-smartcard-reader: Rename CCID_DEV_NAME to TYPE_USB_CCID_DEV Eduardo Habkost
2020-09-03 20:52 ` [PULL 17/27] vfio: Rename VFIO_AP_DEVICE_TYPE to TYPE_VFIO_AP_DEVICE Eduardo Habkost
2020-09-03 20:52 ` [PULL 18/27] vmgenid: Rename VMGENID_DEVICE to TYPE_VMGENID Eduardo Habkost
2020-09-03 20:52 ` [PULL 19/27] ahci: Rename ICH_AHCI to ICH9_AHCI Eduardo Habkost
2020-09-03 20:52 ` [PULL 20/27] esp: Rename ESP_STATE to ESP Eduardo Habkost
2020-09-03 20:52 ` [PULL 21/27] filter-rewriter: Rename FILTER_COLO_REWRITER to FILTER_REWRITER Eduardo Habkost
2020-09-03 20:52 ` [PULL 22/27] rs6000_mc: Rename RS6000MC_DEVICE to RS6000MC Eduardo Habkost
2020-09-03 20:52 ` [PULL 23/27] sabre: Rename SABRE_DEVICE to SABRE Eduardo Habkost
2020-09-03 20:52 ` [PULL 24/27] usb: Rename USB_SERIAL_DEV to USB_SERIAL Eduardo Habkost
2020-09-03 20:52 ` Eduardo Habkost [this message]
2020-09-03 20:52 ` [PULL 26/27] pc87312: Rename TYPE_PC87312_SUPERIO to TYPE_PC87312 Eduardo Habkost
2020-09-03 20:52 ` [PULL 27/27] tusb6010: Rename TUSB to TUSB6010 Eduardo Habkost
2020-09-05 14:30 ` [PULL 00/27] QOM boilerplate cleanup Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200903205247.1667472-26-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=berrange@redhat.com \
--cc=eric.auger@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).