[PATCH 28/33] qemu: Rename qemuDomainDefaultVideoModel()

Andrea Bolognani posted 33 patches 8 months, 2 weeks ago
There is a newer version of this series
[PATCH 28/33] qemu: Rename qemuDomainDefaultVideoModel()
Posted by Andrea Bolognani 8 months, 2 weeks ago
Follow the established naming convention for consistency.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 src/qemu/qemu_domain.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 62a847d47f..22980c25a9 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -6096,20 +6096,23 @@ qemuDomainDeviceNetDefPostParse(virDomainNetDef *net,
 
 
 static int
-qemuDomainDefaultVideoDevice(const virDomainDef *def,
-                          virQEMUCaps *qemuCaps)
+qemuDomainDefaultVideoModel(const virDomainDef *def,
+                            virQEMUCaps *qemuCaps)
 {
     if (ARCH_IS_PPC64(def->os.arch))
         return VIR_DOMAIN_VIDEO_TYPE_VGA;
+
     if (qemuDomainIsARMVirt(def) ||
         qemuDomainIsRISCVVirt(def) ||
         ARCH_IS_S390(def->os.arch)) {
         return VIR_DOMAIN_VIDEO_TYPE_VIRTIO;
     }
+
     if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_CIRRUS_VGA))
         return VIR_DOMAIN_VIDEO_TYPE_CIRRUS;
     if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VGA))
         return VIR_DOMAIN_VIDEO_TYPE_VGA;
+
     return VIR_DOMAIN_VIDEO_TYPE_DEFAULT;
 }
 
@@ -6120,7 +6123,7 @@ qemuDomainDeviceVideoDefPostParse(virDomainVideoDef *video,
                                   virQEMUCaps *qemuCaps)
 {
     if (video->type == VIR_DOMAIN_VIDEO_TYPE_DEFAULT)
-        video->type = qemuDomainDefaultVideoDevice(def, qemuCaps);
+        video->type = qemuDomainDefaultVideoModel(def, qemuCaps);
 
     if (video->type == VIR_DOMAIN_VIDEO_TYPE_QXL &&
         !video->vgamem) {
-- 
2.43.0
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [PATCH 28/33] qemu: Rename qemuDomainDefaultVideoModel()
Posted by Peter Krempa 8 months, 2 weeks ago
On Wed, Jan 24, 2024 at 20:37:48 +0100, Andrea Bolognani wrote:
> Follow the established naming convention for consistency.
> 
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
>  src/qemu/qemu_domain.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> index 62a847d47f..22980c25a9 100644
> --- a/src/qemu/qemu_domain.c
> +++ b/src/qemu/qemu_domain.c
> @@ -6096,20 +6096,23 @@ qemuDomainDeviceNetDefPostParse(virDomainNetDef *net,
>  
>  
>  static int
> -qemuDomainDefaultVideoDevice(const virDomainDef *def,
> -                          virQEMUCaps *qemuCaps)
> +qemuDomainDefaultVideoModel(const virDomainDef *def,

For consistency with what I've pointed out in previous patches you can
also return virDomainVideoType

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org