Re: [PATCHv4 1/3] qemu: hostdev: Fix function spacing and header formatting

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

 



On 10/08/2013 06:46 PM, Peter Krempa wrote:
> ---
>
> Notes:
>     New in this version.
>
>  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;

ACK

--
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]