qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 2/8] cpus: Convert cpu_index into a bitmap


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH v3 2/8] cpus: Convert cpu_index into a bitmap
Date: Thu, 02 Jul 2015 17:45:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Am 18.06.2015 um 19:24 schrieb Peter Crosthwaite:
> diff --git a/exec.c b/exec.c
> index 015fa4a..549c209 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -509,21 +509,66 @@ void tcg_cpu_address_space_init(CPUState *cpu, 
> AddressSpace *as)
>  }
>  #endif
>  
> +#ifndef CONFIG_USER_ONLY
> +static DECLARE_BITMAP(cpu_index_map, MAX_CPUMASK_BITS);
> +
> +static int cpu_get_free_index(Error **errp)
> +{
> +    int cpu = find_first_zero_bit(cpu_index_map, max_cpus);
> +
> +    if (cpu >= max_cpus) {
> +        error_setg(errp, "Trying to use more CPUs than allowed max of %d\n",
> +                   max_cpus);

error_setg() is without \n, fixing.

diff --git a/exec.c b/exec.c
index 53ffb18..e93041f 100644
--- a/exec.c
+++ b/exec.c
@@ -521,7 +521,7 @@ static int cpu_get_free_index(Error **errp)
     int cpu = find_first_zero_bit(cpu_index_map, max_cpus);

     if (cpu >= max_cpus) {
-        error_setg(errp, "Trying to use more CPUs than allowed max of
%d\n",
+        error_setg(errp, "Trying to use more CPUs than allowed max of %d",
                    max_cpus);
         return -1;
     }

Regards,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB
21284 (AG Nürnberg)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]