Re: [PATCH 03/26] conf: Tweak virDomainPCIAddressGetNextAddr() signature

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

 



On 06/02/2017 12:07 PM, Andrea Bolognani wrote:
> Move @function after @flags to match other functions in the
> same module like virDomainPCIAddressReserveNextAddr().

I might have changed the other functions to put flags last (or maybe
not). Anyway, consistency is good.

Reviewed-by: Laine Stump <laine@xxxxxxxxx>

> 
> Also move virDomainPCIAddressReserveNextAddr() closer to
> virDomainPCIAddressReserveAddr() in the header file.
> ---
>  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 9c809e8..6fd8bfc 100644
> --- a/src/conf/domain_addr.c
> +++ b/src/conf/domain_addr.c
> @@ -738,8 +738,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...
> @@ -845,7 +845,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 efa97ca..77e19bb 100644
> --- a/src/conf/domain_addr.h
> +++ b/src/conf/domain_addr.h
> @@ -150,6 +150,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)
> @@ -159,12 +165,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);
>  
> 

--
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]
  Powered by Linux