render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
Blob Blame History Raw
From 2d719331886e3f4ed927449ffde6a854e9deec1b Mon Sep 17 00:00:00 2001
Message-Id: <2d719331886e3f4ed927449ffde6a854e9deec1b@dist-git>
From: Andrea Bolognani <abologna@redhat.com>
Date: Mon, 17 Jul 2017 12:08:59 +0200
Subject: [PATCH] conf: Tweak virDomainPCIAddressGetNextAddr() signature

Move @function after @flags to match other functions in the
same module like virDomainPCIAddressReserveNextAddr().

Also move virDomainPCIAddressReserveNextAddr() closer to
virDomainPCIAddressReserveAddr() in the header file.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Laine Stump <laine@laine.org>
(cherry picked from commit c949f6e69cbe91b9897e37e525181710f5c75b35)

Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1431193

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/conf/domain_addr.c |  6 +++---
 src/conf/domain_addr.h | 12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c
index 0ae1ed93af..b17bb61a1d 100644
--- a/src/conf/domain_addr.c
+++ b/src/conf/domain_addr.c
@@ -752,8 +752,8 @@ virDomainPCIAddressFindUnusedFunctionOnBus(virDomainPCIAddressBusPtr bus,
 static int ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
 virDomainPCIAddressGetNextAddr(virDomainPCIAddressSetPtr addrs,
                                virPCIDeviceAddressPtr next_addr,
-                               int function,
-                               virDomainPCIConnectFlags flags)
+                               virDomainPCIConnectFlags flags,
+                               int function)
 {
     /* default to starting the search for a free slot from
      * the first slot of domain 0 bus 0...
@@ -859,7 +859,7 @@ virDomainPCIAddressReserveNextAddr(virDomainPCIAddressSetPtr addrs,
 {
     virPCIDeviceAddress addr;
 
-    if (virDomainPCIAddressGetNextAddr(addrs, &addr, function, flags) < 0)
+    if (virDomainPCIAddressGetNextAddr(addrs, &addr, flags, function) < 0)
         return -1;
 
     if (virDomainPCIAddressReserveAddrInternal(addrs, &addr, flags, false) < 0)
diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h
index c90a335919..bb10f1abf3 100644
--- a/src/conf/domain_addr.h
+++ b/src/conf/domain_addr.h
@@ -158,6 +158,12 @@ int virDomainPCIAddressReserveAddr(virDomainPCIAddressSetPtr addrs,
                                    virDomainPCIConnectFlags flags)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
 
+int virDomainPCIAddressReserveNextAddr(virDomainPCIAddressSetPtr addrs,
+                                       virDomainDeviceInfoPtr dev,
+                                       virDomainPCIConnectFlags flags,
+                                       int function)
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
+
 int virDomainPCIAddressEnsureAddr(virDomainPCIAddressSetPtr addrs,
                                   virDomainDeviceInfoPtr dev,
                                   virDomainPCIConnectFlags flags)
@@ -167,12 +173,6 @@ int virDomainPCIAddressReleaseAddr(virDomainPCIAddressSetPtr addrs,
                                    virPCIDeviceAddressPtr addr)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
 
-int virDomainPCIAddressReserveNextAddr(virDomainPCIAddressSetPtr addrs,
-                                       virDomainDeviceInfoPtr dev,
-                                       virDomainPCIConnectFlags flags,
-                                       int function)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
-
 void virDomainPCIAddressSetAllMulti(virDomainDefPtr def)
     ATTRIBUTE_NONNULL(1);
 
-- 
2.13.3