[PATCH 13/13] Make functions in qemu_domain_address static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The process of moving functions from qemu_domain_address.c to
domain_addr.c is finished, so some of these functions can be
declared static if they aren't used anywhere outside.
---
 src/conf/domain_addr.c   | 20 +++++++++---------
 src/conf/domain_addr.h   | 53 ------------------------------------------------
 src/libvirt_private.syms | 10 ---------
 3 files changed, 10 insertions(+), 73 deletions(-)

diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c
index fa25272..7abe44c 100644
--- a/src/conf/domain_addr.c
+++ b/src/conf/domain_addr.c
@@ -1230,7 +1230,7 @@ virDomainAssignVirtioSerialAddresses(virDomainDefPtr def)
 }
 
 
-int
+static int
 virDomainCollectPCIAddress(virDomainDefPtr def ATTRIBUTE_UNUSED,
                            virDomainDeviceDefPtr device,
                            virDomainDeviceInfoPtr info,
@@ -1390,7 +1390,7 @@ virDomainMachineIsI440FX(const virDomainDef *def)
 }
 
 
-int
+static int
 virDomainValidateDevicePCISlotsPIIX3(virDomainDefPtr def,
                                       virDomainPCIAddressSetPtr addrs,
                                       bool videoPrimaryEnabled)
@@ -1523,7 +1523,7 @@ virDomainValidateDevicePCISlotsPIIX3(virDomainDefPtr def,
 }
 
 
-int
+static int
 virDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
                                     virDomainPCIAddressSetPtr addrs,
                                     bool videoPrimaryEnabled)
@@ -1714,7 +1714,7 @@ virDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
 }
 
 
-int
+static int
 virDomainValidateDevicePCISlotsChipsets(virDomainDefPtr def,
                                          virDomainPCIAddressSetPtr addrs,
                                          bool videoPrimaryEnabled)
@@ -1733,7 +1733,7 @@ virDomainValidateDevicePCISlotsChipsets(virDomainDefPtr def,
 }
 
 
-int
+static int
 virDomainAddressFindNewBusNr(virDomainDefPtr def)
 {
 /* Try to find a nice default for busNr for a new pci-expander-bus.
@@ -1801,7 +1801,7 @@ virDomainAddressFindNewBusNr(virDomainDefPtr def)
 }
 
 
-virDomainPCIAddressSetPtr
+static virDomainPCIAddressSetPtr
 virDomainPCIAddressSetCreate(virDomainDefPtr def,
                              unsigned int nbuses,
                              bool dryRun)
@@ -1859,7 +1859,7 @@ virDomainPCIAddressSetCreate(virDomainDefPtr def,
 }
 
 
-bool
+static bool
 virDomainPCIBusFullyReserved(virDomainPCIAddressBusPtr bus)
 {
     size_t i;
@@ -1908,7 +1908,7 @@ virDomainPCIBusFullyReserved(virDomainPCIAddressBusPtr bus)
  * function must only try to reserve addresses if info.type == NONE and
  * skip over info.type == PCI
  */
-int
+static int
 virDomainAssignDevicePCISlots(virDomainDefPtr def,
                               virDomainPCIAddressSetPtr addrs,
                               bool virtioMMIOEnabled)
@@ -2234,7 +2234,7 @@ virDomainMachineIsVirt(const virDomainDef *def)
 }
 
 
-bool
+static bool
 virDomainSupportsPCI(virDomainDefPtr def,
                      bool gpexEnabled)
 {
@@ -2295,7 +2295,7 @@ virDomainPCIAddrSetCreateFromDomain(virDomainDefPtr def,
 }
 
 
-void
+static void
 virDomainPCIControllerSetDefaultModelName(virDomainControllerDefPtr cont)
 {
     int *modelName = &cont->opts.pciopts.modelName;
diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h
index 49ddf09..8fa6f60 100644
--- a/src/conf/domain_addr.h
+++ b/src/conf/domain_addr.h
@@ -232,64 +232,15 @@ int
 virDomainAssignVirtioSerialAddresses(virDomainDefPtr def)
     ATTRIBUTE_NONNULL(1);
 
-int
-virDomainCollectPCIAddress(virDomainDefPtr def,
-                           virDomainDeviceDefPtr device,
-                           virDomainDeviceInfoPtr info,
-                           void *opaque);
-
 bool
 virDomainMachineIsQ35(const virDomainDef *def);
 
 bool
 virDomainMachineIsI440FX(const virDomainDef *def);
 
-int
-virDomainValidateDevicePCISlotsPIIX3(virDomainDefPtr def,
-                                      virDomainPCIAddressSetPtr addrs,
-                                      bool videoPrimaryEnabled)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
-
-int
-virDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
-                                    virDomainPCIAddressSetPtr addrs,
-                                    bool videoPrimaryEnabled)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
-
-int
-virDomainValidateDevicePCISlotsChipsets(virDomainDefPtr def,
-                                         virDomainPCIAddressSetPtr addrs,
-                                         bool videoPrimaryEnabled)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
-
-int
-virDomainAddressFindNewBusNr(virDomainDefPtr def)
-    ATTRIBUTE_NONNULL(1);
-
-virDomainPCIAddressSetPtr
-virDomainPCIAddressSetCreate(virDomainDefPtr def,
-                             unsigned int nbuses,
-                             bool dryRun)
-    ATTRIBUTE_NONNULL(1);
-
-bool
-virDomainPCIBusFullyReserved(virDomainPCIAddressBusPtr bus)
-    ATTRIBUTE_NONNULL(1);
-
-int
-virDomainAssignDevicePCISlots(virDomainDefPtr def,
-                              virDomainPCIAddressSetPtr addrs,
-                              bool virtioMMIOEnabled)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
-
 bool
 virDomainMachineIsVirt(const virDomainDef *def);
 
-bool
-virDomainSupportsPCI(virDomainDefPtr def,
-                     bool gpexEnabled)
-    ATTRIBUTE_NONNULL(1);
-
 virDomainPCIAddressSetPtr
 virDomainPCIAddrSetCreateFromDomain(virDomainDefPtr def,
                                      bool virtioMMIOEnabled,
@@ -305,8 +256,4 @@ virDomainAssignPCIAddresses(virDomainDefPtr def,
                             bool gpexEnabled)
     ATTRIBUTE_NONNULL(1);
 
-void
-virDomainPCIControllerSetDefaultModelName(virDomainControllerDefPtr cont)
-    ATTRIBUTE_NONNULL(1);
-
 #endif /* __DOMAIN_ADDR_H__ */
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index f4e7b45..b3f1ded 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -85,8 +85,6 @@ virPCIDeviceAddressParseXML;
 
 
 # conf/domain_addr.h
-virDomainAddressFindNewBusNr;
-virDomainAssignDevicePCISlots;
 virDomainAssignPCIAddresses;
 virDomainAssignVirtioSerialAddresses;
 virDomainCCWAddressAllocate;
@@ -94,7 +92,6 @@ virDomainCCWAddressAssign;
 virDomainCCWAddressSetCreate;
 virDomainCCWAddressSetFree;
 virDomainCCWAddressValidate;
-virDomainCollectPCIAddress;
 virDomainGetBlkioParametersAssignFromDef;
 virDomainMachineIsI440FX;
 virDomainMachineIsQ35;
@@ -108,19 +105,12 @@ virDomainPCIAddressReserveAddr;
 virDomainPCIAddressReserveNextSlot;
 virDomainPCIAddressReserveSlot;
 virDomainPCIAddressSetAlloc;
-virDomainPCIAddressSetCreate;
 virDomainPCIAddressSetFree;
 virDomainPCIAddressSetGrow;
 virDomainPCIAddressSlotInUse;
 virDomainPCIAddressValidate;
 virDomainPCIAddrSetCreateFromDomain;
-virDomainPCIBusFullyReserved;
 virDomainPCIControllerModelToConnectType;
-virDomainPCIControllerSetDefaultModelName;
-virDomainSupportsPCI;
-virDomainValidateDevicePCISlotsChipsets;
-virDomainValidateDevicePCISlotsPIIX3;
-virDomainValidateDevicePCISlotsQ35;
 virDomainVirtioSerialAddrAssign;
 virDomainVirtioSerialAddrAutoAssign;
 virDomainVirtioSerialAddrIsComplete;
-- 
2.7.4 (Apple Git-66)

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]