Re: [PATCH 02/12] qemu: caps: Tweak arm conditional in SupportsChardev

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

 



On Mon, 2017-06-26 at 14:01 -0400, Cole Robinson wrote:
> @@ -5568,17 +5568,22 @@ virQEMUCapsSupportsChardev(const virDomainDef *def,
>          if (chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
>              chr->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO)
>              return false;
> +        return true;

This is unnecessary, since the last statement causes the
function to return 'true' in any case.

>      }
>  
> -    if ((def->os.arch != VIR_ARCH_ARMV7L) && (def->os.arch != VIR_ARCH_AARCH64))
> +    if ((def->os.arch == VIR_ARCH_ARMV7L) ||
> +        (def->os.arch == VIR_ARCH_AARCH64)) {

You can keep the condition on a single line, and drop
the pointless parentheses while you're at it.

> +        /* TARGET_TYPE_ISA here really means 'the default', which we
> +           treat as whatever the built in platform serial device is on.
> +           And for platform devices we can't use -chardev */

Very minor thing, but usually all lines in a multi-line
comments start with an asterisk.

> +        if (chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
> +            chr->targetType == VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA)
> +            return false;
> +
>          return true;

This return statement can be left out like the one I
commented on above.


Reviewed-by: Andrea Bolognani <abologna@xxxxxxxxxx>

-- 
Andrea Bolognani / Red Hat / Virtualization

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