render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
Blob Blame History Raw
From b6784357c6f65806e2fd70d9b2e6982b89587685 Mon Sep 17 00:00:00 2001
Message-Id: <b6784357c6f65806e2fd70d9b2e6982b89587685.1382534060.git.jdenemar@redhat.com>
From: Peter Krempa <pkrempa@redhat.com>
Date: Thu, 10 Oct 2013 13:56:35 +0200
Subject: [PATCH] qemu: hostdev: Fix function spacing and header formatting

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

(cherry picked from commit f24150b1f53530e0ec057405665b771c776af9ac)

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/qemu/qemu_hostdev.c | 60 ++++++++++++++++++++++++++++++++++---------------
 1 file changed, 42 insertions(+), 18 deletions(-)

diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c
index 21fe47f..4127abd 100644
--- a/src/qemu/qemu_hostdev.c
+++ b/src/qemu/qemu_hostdev.c
@@ -85,6 +85,7 @@ qemuGetPciHostDeviceList(virDomainHostdevDefPtr *hostdevs, int nhostdevs)
     return list;
 }
 
+
 /*
  * qemuGetActivePciHostDeviceList - make a new list with a *copy* of
  *   every virPCIDevice object that is found on the activePciHostdevs
@@ -128,8 +129,10 @@ qemuGetActivePciHostDeviceList(virQEMUDriverPtr driver,
     return list;
 }
 
-int qemuUpdateActivePciHostdevs(virQEMUDriverPtr driver,
-                                virDomainDefPtr def)
+
+int
+qemuUpdateActivePciHostdevs(virQEMUDriverPtr driver,
+                            virDomainDefPtr def)
 {
     virDomainHostdevDefPtr hostdev = NULL;
     virPCIDevicePtr dev = NULL;
@@ -188,6 +191,7 @@ cleanup:
     return ret;
 }
 
+
 int
 qemuUpdateActiveUsbHostdevs(virQEMUDriverPtr driver,
                             virDomainDefPtr def)
@@ -274,8 +278,10 @@ cleanup:
     return ret;
 }
 
+
 static int
-qemuDomainHostdevPciSysfsPath(virDomainHostdevDefPtr hostdev, char **sysfs_path)
+qemuDomainHostdevPciSysfsPath(virDomainHostdevDefPtr hostdev,
+                              char **sysfs_path)
 {
     virPCIDeviceAddress config_address;
 
@@ -287,6 +293,7 @@ qemuDomainHostdevPciSysfsPath(virDomainHostdevDefPtr hostdev, char **sysfs_path)
     return virPCIDeviceAddressGetSysfsFile(&config_address, sysfs_path);
 }
 
+
 int
 qemuDomainHostdevIsVirtualFunction(virDomainHostdevDefPtr hostdev)
 {
@@ -303,6 +310,7 @@ qemuDomainHostdevIsVirtualFunction(virDomainHostdevDefPtr hostdev)
     return ret;
 }
 
+
 static int
 qemuDomainHostdevNetDevice(virDomainHostdevDefPtr hostdev, char **linkdev,
                            int *vf)
@@ -331,6 +339,7 @@ cleanup:
     return ret;
 }
 
+
 static int
 qemuDomainHostdevNetConfigVirtPortProfile(const char *linkdev, int vf,
                                           virNetDevVPortProfilePtr virtPort,
@@ -370,6 +379,7 @@ qemuDomainHostdevNetConfigVirtPortProfile(const char *linkdev, int vf,
     return ret;
 }
 
+
 int
 qemuDomainHostdevNetConfigReplace(virDomainHostdevDefPtr hostdev,
                                   const unsigned char *uuid,
@@ -438,6 +448,7 @@ cleanup:
     return ret;
 }
 
+
 int
 qemuDomainHostdevNetConfigRestore(virDomainHostdevDefPtr hostdev,
                                   char *stateDir)
@@ -474,11 +485,13 @@ qemuDomainHostdevNetConfigRestore(virDomainHostdevDefPtr hostdev,
     return ret;
 }
 
-int qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
-                                 const char *name,
-                                 const unsigned char *uuid,
-                                 virDomainHostdevDefPtr *hostdevs,
-                                 int nhostdevs)
+
+int
+qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
+                             const char *name,
+                             const unsigned char *uuid,
+                             virDomainHostdevDefPtr *hostdevs,
+                             int nhostdevs)
 {
     virPCIDeviceListPtr pcidevs;
     int last_processed_hostdev_vf = -1;
@@ -670,6 +683,7 @@ cleanup:
     return ret;
 }
 
+
 int
 qemuPrepareHostdevUSBDevices(virQEMUDriverPtr driver,
                              const char *name,
@@ -722,6 +736,7 @@ error:
     return -1;
 }
 
+
 int
 qemuFindHostdevUSBDevice(virDomainHostdevDefPtr hostdev,
                          bool mandatory,
@@ -809,6 +824,7 @@ out:
     return 0;
 }
 
+
 static int
 qemuPrepareHostUSBDevices(virQEMUDriverPtr driver,
                           virDomainDefPtr def,
@@ -878,6 +894,7 @@ cleanup:
     return ret;
 }
 
+
 int
 qemuPrepareHostdevSCSIDevices(virQEMUDriverPtr driver,
                               const char *name,
@@ -996,9 +1013,11 @@ cleanup:
     return -1;
 }
 
-int qemuPrepareHostDevices(virQEMUDriverPtr driver,
-                           virDomainDefPtr def,
-                           bool coldBoot)
+
+int
+qemuPrepareHostDevices(virQEMUDriverPtr driver,
+                       virDomainDefPtr def,
+                       bool coldBoot)
 {
     if (!def->nhostdevs)
         return 0;
@@ -1022,7 +1041,8 @@ int qemuPrepareHostDevices(virQEMUDriverPtr driver,
  * Pre-condition: driver->inactivePciHostdevs & driver->activePciHostdevs
  * are locked
  */
-void qemuReattachPciDevice(virPCIDevicePtr dev, virQEMUDriverPtr driver)
+void
+qemuReattachPciDevice(virPCIDevicePtr dev, virQEMUDriverPtr driver)
 {
     int retries = 100;
 
@@ -1052,10 +1072,11 @@ void qemuReattachPciDevice(virPCIDevicePtr dev, virQEMUDriverPtr driver)
 }
 
 
-void qemuDomainReAttachHostdevDevices(virQEMUDriverPtr driver,
-                                      const char *name,
-                                      virDomainHostdevDefPtr *hostdevs,
-                                      int nhostdevs)
+void
+qemuDomainReAttachHostdevDevices(virQEMUDriverPtr driver,
+                                 const char *name,
+                                 virDomainHostdevDefPtr *hostdevs,
+                                 int nhostdevs)
 {
     virPCIDeviceListPtr pcidevs;
     size_t i;
@@ -1140,6 +1161,7 @@ cleanup:
     virObjectUnref(cfg);
 }
 
+
 static void
 qemuDomainReAttachHostUsbDevices(virQEMUDriverPtr driver,
                                  const char *name,
@@ -1203,6 +1225,7 @@ qemuDomainReAttachHostUsbDevices(virQEMUDriverPtr driver,
     virObjectUnlock(driver->activeUsbHostdevs);
 }
 
+
 void
 qemuDomainReAttachHostScsiDevices(virQEMUDriverPtr driver,
                                   const char *name,
@@ -1272,8 +1295,9 @@ qemuDomainReAttachHostScsiDevices(virQEMUDriverPtr driver,
     virObjectUnlock(driver->activeScsiHostdevs);
 }
 
-void qemuDomainReAttachHostDevices(virQEMUDriverPtr driver,
-                                   virDomainDefPtr def)
+void
+qemuDomainReAttachHostDevices(virQEMUDriverPtr driver,
+                              virDomainDefPtr def)
 {
     if (!def->nhostdevs)
         return;
-- 
1.8.4