From nobody Wed Feb 11 03:03:47 2026 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; dkim=fail; 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1508214261591282.63814526650856; Mon, 16 Oct 2017 21:24:21 -0700 (PDT) Received: from localhost ([::1]:36345 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4JQI-0001AC-9J for importer@patchew.org; Tue, 17 Oct 2017 00:24:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4JOP-0008GJ-HD for qemu-devel@nongnu.org; Tue, 17 Oct 2017 00:22:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4JOO-0006rU-Io for qemu-devel@nongnu.org; Tue, 17 Oct 2017 00:22:13 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:40373) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e4JON-0006pr-Rs; Tue, 17 Oct 2017 00:22:12 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3yGMTp5sXFz9sPk; Tue, 17 Oct 2017 15:22:06 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1508214126; bh=EnLk2jKAWSKDJ3IlL43VtnPT/AKGvMDT5ls87o732AY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GbJdRwZ1d2JaMUH/aHjmMu7TRp+RXCk8piSzXY/TsQYraT+teyRMCQBXhKb9aXSV1 ZXbUgmJOLR4LwPHfn2+JEnmpaOZOydpptgD/NkSNlKC7YiaSOvMrGYeL4vJxA3KLob IgiGT9Bq77xrhNYWAusEjUcyDpdd3QbbN3/JPYz4= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 17 Oct 2017 15:21:20 +1100 Message-Id: <20171017042152.29443-3-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171017042152.29443-1-david@gibson.dropbear.id.au> References: <20171017042152.29443-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 02/34] hw/ppc: use 0 instead of fdt_path_offset(fdt, "/") 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: agraf@suse.de, ehabkost@redhat.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, imammedo@redhat.com, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Greg Kurz The offset of the root node is guaranteed to be 0. This doesn't fix anything, it's just trivial cleanup of the two remaining places where this was done under hw/ppc. Signed-off-by: Greg Kurz Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Daniel Henrique Barboza Signed-off-by: David Gibson --- hw/ppc/pnv.c | 3 +-- hw/ppc/spapr.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index d46d91c76f..84b2389ea6 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -92,8 +92,7 @@ static int get_cpus_node(void *fdt) int cpus_offset =3D fdt_path_offset(fdt, "/cpus"); =20 if (cpus_offset < 0) { - cpus_offset =3D fdt_add_subnode(fdt, fdt_path_offset(fdt, "/"), - "cpus"); + cpus_offset =3D fdt_add_subnode(fdt, 0, "cpus"); if (cpus_offset) { _FDT((fdt_setprop_cell(fdt, cpus_offset, "#address-cells", 0x1= ))); _FDT((fdt_setprop_cell(fdt, cpus_offset, "#size-cells", 0x0))); diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index ff87f155d5..352ff3d614 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -353,8 +353,7 @@ static int spapr_fixup_cpu_dt(void *fdt, sPAPRMachineSt= ate *spapr) =20 cpus_offset =3D fdt_path_offset(fdt, "/cpus"); if (cpus_offset < 0) { - cpus_offset =3D fdt_add_subnode(fdt, fdt_path_offset(fdt, "/"), - "cpus"); + cpus_offset =3D fdt_add_subnode(fdt, 0, "cpus"); if (cpus_offset < 0) { return cpus_offset; } --=20 2.13.6