[libvirt] [PATCH] qemu: remove deadcode in qemuDomain{HelperGetVcpus|GetIOThreadsLive}

Michal Privoznik mprivozn at redhat.com
Wed Jul 8 08:27:26 UTC 2015


On 03.07.2015 03:57, Luyao Huang wrote:
> We set hostcpus but not use them.
> 
> Signed-off-by: Luyao Huang <lhuang at redhat.com>
> ---
>  src/qemu/qemu_driver.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 7a04e67..3f002b3 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -1418,13 +1418,9 @@ static int
>  qemuDomainHelperGetVcpus(virDomainObjPtr vm, virVcpuInfoPtr info, int maxinfo,
>                           unsigned char *cpumaps, int maplen)
>  {
> -    int hostcpus;
>      size_t i, v;
>      qemuDomainObjPrivatePtr priv = vm->privateData;
>  
> -    if ((hostcpus = nodeGetCPUCount()) < 0)
> -        return -1;
> -
>      if (priv->vcpupids == NULL) {
>          virReportError(VIR_ERR_OPERATION_INVALID,
>                         "%s", _("cpu affinity is not supported"));
> @@ -5579,7 +5575,6 @@ qemuDomainGetIOThreadsLive(virQEMUDriverPtr driver,
>      qemuMonitorIOThreadInfoPtr *iothreads = NULL;
>      virDomainIOThreadInfoPtr *info_ret = NULL;
>      int niothreads = 0;
> -    int hostcpus;
>      size_t i;
>      int ret = -1;
>  
> @@ -5612,9 +5607,6 @@ qemuDomainGetIOThreadsLive(virQEMUDriverPtr driver,
>          goto endjob;
>      }
>  
> -    if ((hostcpus = nodeGetCPUCount()) < 0)
> -        goto endjob;
> -
>      if (VIR_ALLOC_N(info_ret, niothreads) < 0)
>          goto endjob;
>  
> 

Tweaked the commit message a bit, ACKed and pushed.

Michal




More information about the libvir-list mailing list