From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eikGf-0004nk-Rj for qemu-devel@nongnu.org; Mon, 05 Feb 2018 12:09:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eikGe-0002GT-GE for qemu-devel@nongnu.org; Mon, 05 Feb 2018 12:09:21 -0500 Date: Mon, 5 Feb 2018 18:09:10 +0100 From: Igor Mammedov Message-ID: <20180205180910.16b8a5ba@redhat.com> In-Reply-To: <1516694904-64879-26-git-send-email-imammedo@redhat.com> References: <1516694904-64879-1-git-send-email-imammedo@redhat.com> <1516694904-64879-26-git-send-email-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 25/25] cpu: get rid of cpu_generic_init() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Richard Henderson , Laurent Vivier , Philippe =?UTF-8?B?TWF0aGlldS1EYXVkw6k=?= , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Paolo Bonzini , Alex =?UTF-8?B?QmVubsOpZQ==?= , "Emilio G. Cota" On Tue, 23 Jan 2018 09:08:24 +0100 Igor Mammedov wrote: > There aren't any users of the helper left, remove it. after rebase this patch nor longer does what subj says and it should be squashed into 23/25 where cpu_generic_init() is removed, so pls ignore this patch I'll post v4 for 23/25 with this squashed in and actual removal of not used MachineState::cpu_model which I've lost on rebase. >=20 > Signed-off-by: Igor Mammedov > --- > CC: Richard Henderson > CC: "Emilio G. Cota" > CC: Paolo Bonzini > CC: Eduardo Habkost > CC: "Alex Benn=C3=A9e" > CC: "Philippe Mathieu-Daud=C3=A9" > --- > qom/cpu.c | 17 ++--------------- > 1 file changed, 2 insertions(+), 15 deletions(-) >=20 > diff --git a/qom/cpu.c b/qom/cpu.c > index aab8437..cf6880d 100644 > --- a/qom/cpu.c > +++ b/qom/cpu.c > @@ -304,22 +304,9 @@ static ObjectClass *cpu_common_class_by_name(const c= har *cpu_model) > static void cpu_common_parse_features(const char *typename, char *featur= es, > Error **errp) > { > - char *featurestr; /* Single "key=3Dvalue" string being parsed */ > char *val; > - static bool cpu_globals_initialized; > - > - /* TODO: all callers of ->parse_features() need to be changed to > - * call it only once, so we can remove this check (or change it > - * to assert(!cpu_globals_initialized). > - * Current callers of ->parse_features() are: > - * - cpu_generic_init() > - */ > - if (cpu_globals_initialized) { > - return; > - } > - cpu_globals_initialized =3D true; > - > - featurestr =3D features ? strtok(features, ",") : NULL; > + /* Single "key=3Dvalue" string being parsed */ > + char *featurestr =3D features ? strtok(features, ",") : NULL; > =20 > while (featurestr) { > val =3D strchr(featurestr, '=3D');