]> xenbits.xensource.com Git - people/aperard/libvirt.git/commitdiff
vircpi: Decrease scope of VIR_PCI_DEVICE_ADDRESS_FMT macro
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 28 Nov 2023 15:31:00 +0000 (16:31 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 5 Dec 2023 08:26:47 +0000 (09:26 +0100)
The VIR_PCI_DEVICE_ADDRESS_FMT macro is used only in virpci.c and
nowhere else. It's not necessary to expose it in the header file.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virpci.c
src/util/virpci.h

index eae698c0a0e3626298eb46b455430b5efea6850d..afce7b52b77fe4a9c79ad3783b8813a719fc3930 100644 (file)
@@ -42,6 +42,7 @@ VIR_LOG_INIT("util.pci");
 
 #define PCI_SYSFS "/sys/bus/pci/"
 #define PCI_ID_LEN 10   /* "XXXX XXXX" */
+#define VIR_PCI_DEVICE_ADDRESS_FMT "%04x:%02x:%02x.%d"
 
 VIR_ENUM_IMPL(virPCIELinkSpeed,
               VIR_PCIE_LINK_SPEED_LAST,
index e964a2685cd66f5d04d6c643ce1ae426f77ce9ef..bc7cb2329f805688fe525988db168cb5359ed4df 100644 (file)
@@ -50,8 +50,6 @@ struct _virZPCIDeviceAddress {
     /* Don't forget to update virPCIDeviceAddressCopy if needed. */
 };
 
-#define VIR_PCI_DEVICE_ADDRESS_FMT "%04x:%02x:%02x.%d"
-
 struct _virPCIDeviceAddress {
     unsigned int domain;
     unsigned int bus;