From nobody Fri Nov 14 03:49:25 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584494794; cv=none; d=zohomail.com; s=zohoarc; b=hb8XKBfTbrPJsTKrxsYLg9gfQZVzTCrNHuVIIGEK2rA+MYCqpB7G8BrsrA4EF1TGOatqLJJqPCmyWDLX9nBttF1BhZbIrgDjEKYQRzIGp0ihgduAq/IwswD1S/RuX2jN45MybxOsUy8aiiepSIzjfKi5xPKxBInpAWU12yEZmRs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584494794; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xj0koGR1OOWTs/7O6WlMBbzTU6PRJEmOAi0wJCQpdTY=; b=kyBJEyjlo7530M7EQi+H7/LDeBg/ciLA60zSUT8XeZzXGH+8SPcwhwgdXXEcJjljBwMQM4fjqCMaJsVN2R0QVgjGDYfC4sH++sM4ZU/pt9TLlgP1Qdux4Uf62XXQEpw4MyUFL1VK7Z9ETiBsZ6DLNIDUJBnICtGQf3D6BaS9UFs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584494794469964.1707186570554; Tue, 17 Mar 2020 18:26:34 -0700 (PDT) Received: from localhost ([::1]:44084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jENTd-0006ey-Fa for importer@patchew.org; Tue, 17 Mar 2020 21:26:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34673) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jENLn-0004aI-Ij for qemu-devel@nongnu.org; Tue, 17 Mar 2020 21:18:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jENLl-0002no-Nc for qemu-devel@nongnu.org; Tue, 17 Mar 2020 21:18:27 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:33212) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jENLl-0002ld-IW for qemu-devel@nongnu.org; Tue, 17 Mar 2020 21:18:25 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-71-GUY6RpzSPbiFRrIvkTDnSw-1; Tue, 17 Mar 2020 21:18:23 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 03BBF800D50; Wed, 18 Mar 2020 01:18:22 +0000 (UTC) Received: from localhost (ovpn-118-148.rdu2.redhat.com [10.10.118.148]) by smtp.corp.redhat.com (Postfix) with ESMTP id C9A1E10016EB; Wed, 18 Mar 2020 01:18:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584494305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xj0koGR1OOWTs/7O6WlMBbzTU6PRJEmOAi0wJCQpdTY=; b=a7MH6+ToTluuJ+tlCpCh1WTEiMylQXFHLvltSOooXEMyxHGyjjFEkDCho+pJnzMKVPlehS N6rYwBZ0lVTjZCHoEnUJ7BqEO3d6cS/G0QUmLNJwz/vxiBsQwh9Y9Yu3/YR3zrlba4ze9l yuBBfTsTf7IwKzz4Xdo1zeyU9L3XjSM= X-MC-Unique: GUY6RpzSPbiFRrIvkTDnSw-1 From: Eduardo Habkost To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 11/13] hw/i386: Remove unnecessary initialization in x86_cpu_new Date: Tue, 17 Mar 2020 21:17:46 -0400 Message-Id: <20200318011748.2104336-12-ehabkost@redhat.com> In-Reply-To: <20200318011748.2104336-1-ehabkost@redhat.com> References: <20200318011748.2104336-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S . Tsirkin" , Babu Moger , Igor Mammedov , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Babu Moger The function pc_cpu_pre_plug takes care of initialization of CPUX86State. So, remove the initialization here. Suggested-by: Igor Mammedov Signed-off-by: Babu Moger Reviewed-by: Igor Mammedov Acked-by: Michael S. Tsirkin Message-Id: <158396719336.58170.11951852360759449871.stgit@naples-babu.amd.= com> --- hw/i386/x86.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/i386/x86.c b/hw/i386/x86.c index b7d94e8dfe..41b884605f 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -103,13 +103,9 @@ void x86_cpu_new(X86MachineState *x86ms, int64_t apic_= id, Error **errp) { Object *cpu =3D NULL; Error *local_err =3D NULL; - CPUX86State *env =3D NULL; =20 cpu =3D object_new(MACHINE(x86ms)->cpu_type); =20 - env =3D &X86_CPU(cpu)->env; - env->nr_dies =3D x86ms->smp_dies; - object_property_set_uint(cpu, apic_id, "apic-id", &local_err); object_property_set_bool(cpu, true, "realized", &local_err); =20 --=20 2.24.1