From nobody Tue Nov 4 21:46:12 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; 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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 153112296201128.19410031875816; Mon, 9 Jul 2018 00:56:02 -0700 (PDT) Received: from localhost ([::1]:39781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcR1c-0005tZ-Ta for importer@patchew.org; Mon, 09 Jul 2018 03:56:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcQqB-00055u-5g for qemu-devel@nongnu.org; Mon, 09 Jul 2018 03:44:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcQqA-0002H5-0G for qemu-devel@nongnu.org; Mon, 09 Jul 2018 03:44:11 -0400 Received: from ozlabs.org ([203.11.71.1]:49169) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fcQq9-0002Df-JE; Mon, 09 Jul 2018 03:44:09 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 41PHQT2Mygz9s3T; Mon, 9 Jul 2018 17:44:00 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1531122241; bh=lA0AjYCmItaLelH9A90rgEzTc6afeG3cpfUcUq/CSm0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E5H8xk+QxKifrYx6ufVJgUvXknZ/Gb3dq1oprDNG8cduWA4FTmYM0YjxTwfvs4k1g lqHawmFDpdulUXI/0Rw3oFR+OTkMcg/WJpWp+0fYz+Opn/Id2svi5laexxH6wLlRum AVlrMWzHFQz6JXWlHHfaoibWvxIz+5GhXFq+rqrk= From: David Gibson To: peter.maydell@linaro.org Date: Mon, 9 Jul 2018 17:43:49 +1000 Message-Id: <20180709074350.27086-16-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180709074350.27086-1-david@gibson.dropbear.id.au> References: <20180709074350.27086-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 15/16] sam460ex: Don't check for errors from qemu_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: qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, clg@kaod.org, 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-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The qemu_fdt_*() helper functions already exit with a message instead of returning errors, so we don't need to check for errors in the caller. Signed-off-by: David Gibson --- hw/ppc/sam460ex.c | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index 1661e036f3..8194f32cd3 100644 --- a/hw/ppc/sam460ex.c +++ b/hw/ppc/sam460ex.c @@ -276,32 +276,18 @@ static int sam460ex_load_device_tree(hwaddr addr, =20 /* Manipulate device tree in memory. */ =20 - ret =3D qemu_fdt_setprop(fdt, "/memory", "reg", mem_reg_property, - sizeof(mem_reg_property)); - if (ret < 0) { - error_report("couldn't set /memory/reg"); - } + qemu_fdt_setprop(fdt, "/memory", "reg", mem_reg_property, + sizeof(mem_reg_property)); =20 /* default FDT doesn't have a /chosen node... */ qemu_fdt_add_subnode(fdt, "/chosen"); =20 - ret =3D qemu_fdt_setprop_cell(fdt, "/chosen", "linux,initrd-start", - initrd_base); - if (ret < 0) { - error_report("couldn't set /chosen/linux,initrd-start"); - } + qemu_fdt_setprop_cell(fdt, "/chosen", "linux,initrd-start", initrd_bas= e); =20 - ret =3D qemu_fdt_setprop_cell(fdt, "/chosen", "linux,initrd-end", - (initrd_base + initrd_size)); - if (ret < 0) { - error_report("couldn't set /chosen/linux,initrd-end"); - } + qemu_fdt_setprop_cell(fdt, "/chosen", "linux,initrd-end", + (initrd_base + initrd_size)); =20 - ret =3D qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", - kernel_cmdline); - if (ret < 0) { - error_report("couldn't set /chosen/bootargs"); - } + qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", kernel_cmdline); =20 /* Copy data from the host device tree into the guest. Since the guest= can * directly access the timebase without host involvement, we must expo= se --=20 2.17.1