From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAggP-0002MQ-FX for qemu-devel@nongnu.org; Thu, 02 Jul 2015 11:45:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAggJ-0004uR-6G for qemu-devel@nongnu.org; Thu, 02 Jul 2015 11:45:48 -0400 Received: from cantor2.suse.de ([195.135.220.15]:42909 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAggI-0004sG-VY for qemu-devel@nongnu.org; Thu, 02 Jul 2015 11:45:43 -0400 Message-ID: <55955CA3.2080408@suse.de> Date: Thu, 02 Jul 2015 17:45:39 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1434648295-30584-1-git-send-email-crosthwaite.peter@gmail.com> <1434648295-30584-3-git-send-email-crosthwaite.peter@gmail.com> In-Reply-To: <1434648295-30584-3-git-send-email-crosthwaite.peter@gmail.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 2/8] cpus: Convert cpu_index into a bitmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite , qemu-devel@nongnu.org, Bharata B Rao Cc: rth@twiddle.net, ehabkost@redhat.com, aurelien@aurel32.net, Peter Crosthwaite 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, Ad= dressSpace *as) > } > #endif > =20 > +#ifndef CONFIG_USER_ONLY > +static DECLARE_BITMAP(cpu_index_map, MAX_CPUMASK_BITS); > + > +static int cpu_get_free_index(Error **errp) > +{ > + int cpu =3D find_first_zero_bit(cpu_index_map, max_cpus); > + > + if (cpu >=3D 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 =3D find_first_zero_bit(cpu_index_map, max_cpus); if (cpu >=3D 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 --=20 SUSE Linux GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Felix Imend=F6rffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB 21284 (AG N=FCrnberg)