From nobody Tue Oct 28 01:53:46 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516180958244150.8845131481761; Wed, 17 Jan 2018 01:22:38 -0800 (PST) Received: from localhost ([::1]:49906 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebjvZ-0001zH-CN for importer@patchew.org; Wed, 17 Jan 2018 04:22:37 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebjtb-0000fS-61 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 04:20:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebjtX-0006l8-U6 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 04:20:35 -0500 Received: from 4.mo179.mail-out.ovh.net ([46.105.36.149]:60724) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebjtX-0006k2-No for qemu-devel@nongnu.org; Wed, 17 Jan 2018 04:20:31 -0500 Received: from player716.ha.ovh.net (b6.ovh.net [213.186.33.56]) by mo179.mail-out.ovh.net (Postfix) with ESMTP id 395A78F163 for ; Wed, 17 Jan 2018 10:20:30 +0100 (CET) Received: from bahia.lan (lns-bzn-46-82-253-208-248.adsl.proxad.net [82.253.208.248]) (Authenticated sender: groug@kaod.org) by player716.ha.ovh.net (Postfix) with ESMTPA id EAB525600C7; Wed, 17 Jan 2018 10:20:27 +0100 (CET) From: Greg Kurz To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 10:20:27 +0100 Message-ID: <151618082784.20461.10973754439669848191.stgit@bahia.lan> In-Reply-To: <151618081462.20461.3393245354775542888.stgit@bahia.lan> References: <151618081462.20461.3393245354775542888.stgit@bahia.lan> User-Agent: StGit/0.17.1-46-g6855-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Ovh-Tracer-Id: 1539668126166718803 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtvddrtddugddufeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 46.105.36.149 Subject: [Qemu-devel] [PATCH 1/3] spapr: drop duplicate variable in spapr_core_plug() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 A variable is already defined at the begining of the function to hold a pointer to the CPU core object: sPAPRCPUCore *core =3D SPAPR_CPU_CORE(OBJECT(dev)); No need to define it again in the pre-2.10 compatibility code snipplet. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 499ab647d882..bca838fce638 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3362,9 +3362,7 @@ static void spapr_core_plug(HotplugHandler *hotplug_d= ev, DeviceState *dev, int i; =20 for (i =3D 0; i < cc->nr_threads; i++) { - sPAPRCPUCore *sc =3D SPAPR_CPU_CORE(dev); - - cs =3D CPU(sc->threads[i]); + cs =3D CPU(core->threads[i]); pre_2_10_vmstate_unregister_dummy_icp(cs->cpu_index); } }