From patchwork Mon Feb 1 13:51:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 8179881 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 58A2BBEEE5 for ; Mon, 1 Feb 2016 13:54:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A39AD20454 for ; Mon, 1 Feb 2016 13:54:08 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F225920453 for ; Mon, 1 Feb 2016 13:54:07 +0000 (UTC) Received: from localhost ([::1]:52543 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQEvf-0000cc-C8 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 01 Feb 2016 08:54:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQEu5-0006Pk-6P for qemu-devel@nongnu.org; Mon, 01 Feb 2016 08:52:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQEu4-0003XE-4a for qemu-devel@nongnu.org; Mon, 01 Feb 2016 08:52:29 -0500 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:35087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQEu3-0003X2-UU for qemu-devel@nongnu.org; Mon, 01 Feb 2016 08:52:28 -0500 Received: by mail-wm0-x22e.google.com with SMTP id r129so71514032wmr.0 for ; Mon, 01 Feb 2016 05:52:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OXKI0DfZp+6+J3Yr4e4iH/0iviECzB/cR0EoQOCcIuo=; b=jhtJKrDPwf1iB5utwQDSBYYTq53P5+vMZ48L3+TQgkmDs3NELB5LRidwh+c6SO9oJH fZTAsnn++lCb1eZ3c23Ksfn88511wVwrCgEbeoSjd7vp8CqVFqanUgjxp97YG6zlGmrJ kZMZ1G38yluTyjycdMLb/4y3462U2D5w7m3mA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OXKI0DfZp+6+J3Yr4e4iH/0iviECzB/cR0EoQOCcIuo=; b=C495MZ+emkXSG+sALwGKa6FzToxhbOYRfVGolsDPrA0sKlXJv13LTpzmu0KVGazBdL tpkDe6RJHGEE7Y5aX+c4fAlz/l/UbDJxrE3iM54o+vRfwwLswak8vy8CEyyCyGs6YsDZ zGVDphQkONE+yv+yvBWZKxMpm+SF5iK+J+0C9p9+JJ3CSxwbRzCdZibyChNn/8VOBmUv thS5neMxo9rLc8yyaJIpfVYfjnqpfrRtM/AGSRP5muEdTcsV/KUXIjqhfhFE/1d+jxJ3 pCKNHk+xEMCOc91XhNFKqtmy6LdsC6PItfw1qnXL77CUfO+zzjW4j012QO5qK8rv4s4R u9hA== X-Gm-Message-State: AG10YOR2jxmmjUG9/F642yjNqzTcbkf0GEv3yfrbPdVvF7Ma/SE53/nfYV+QHCi9c6tMldV9 X-Received: by 10.28.111.91 with SMTP id k88mr11178000wmc.86.1454334747245; Mon, 01 Feb 2016 05:52:27 -0800 (PST) Received: from new-host-13.home (LMontsouris-657-1-37-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by smtp.gmail.com with ESMTPSA id lw7sm7925488wjb.19.2016.02.01.05.52.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Feb 2016 05:52:25 -0800 (PST) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, qemu-devel@nongnu.org, qemu-arm@nongnu.org, peter.maydell@linaro.org, alex.williamson@redhat.com, david@gibson.dropbear.id.au Date: Mon, 1 Feb 2016 13:51:52 +0000 Message-Id: <1454334712-12360-9-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454334712-12360-1-git-send-email-eric.auger@linaro.org> References: <1454334712-12360-1-git-send-email-eric.auger@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22e Cc: thomas.lendacky@amd.com, thuth@redhat.com, b.reynal@virtualopensystems.com, patches@linaro.org, crosthwaitepeter@gmail.com, suravee.suthikulpanit@amd.com, pbonzini@redhat.com, alex.bennee@linaro.org, christoffer.dall@linaro.org Subject: [Qemu-devel] [PATCH v6 8/8] hw/arm/sysbus-fdt: remove qemu_fdt_setprop returned value check X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP qemu_fdt_setprop asserts in case of error hence no need to check the returned value. Signed-off-by: Eric Auger Reviewed-by: Peter Maydell --- v3 -> v4: fix returned value --- hw/arm/sysbus-fdt.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/hw/arm/sysbus-fdt.c b/hw/arm/sysbus-fdt.c index 9920388..04afeae 100644 --- a/hw/arm/sysbus-fdt.c +++ b/hw/arm/sysbus-fdt.c @@ -217,7 +217,7 @@ static int add_calxeda_midway_xgmac_fdt_node(SysBusDevice *sbdev, void *opaque) PlatformBusDevice *pbus = data->pbus; void *fdt = data->fdt; const char *parent_node = data->pbus_node_name; - int compat_str_len, i, ret = -1; + int compat_str_len, i; char *nodename; uint32_t *irq_attr, *reg_attr; uint64_t mmio_base, irq_number; @@ -242,12 +242,8 @@ static int add_calxeda_midway_xgmac_fdt_node(SysBusDevice *sbdev, void *opaque) reg_attr[2 * i + 1] = cpu_to_be32( memory_region_size(&vdev->regions[i]->mem)); } - ret = qemu_fdt_setprop(fdt, nodename, "reg", reg_attr, - vbasedev->num_regions * 2 * sizeof(uint32_t)); - if (ret) { - error_report("could not set reg property of node %s", nodename); - goto fail_reg; - } + qemu_fdt_setprop(fdt, nodename, "reg", reg_attr, + vbasedev->num_regions * 2 * sizeof(uint32_t)); irq_attr = g_new(uint32_t, vbasedev->num_irqs * 3); for (i = 0; i < vbasedev->num_irqs; i++) { @@ -257,17 +253,12 @@ static int add_calxeda_midway_xgmac_fdt_node(SysBusDevice *sbdev, void *opaque) irq_attr[3 * i + 1] = cpu_to_be32(irq_number); irq_attr[3 * i + 2] = cpu_to_be32(GIC_FDT_IRQ_FLAGS_LEVEL_HI); } - ret = qemu_fdt_setprop(fdt, nodename, "interrupts", + qemu_fdt_setprop(fdt, nodename, "interrupts", irq_attr, vbasedev->num_irqs * 3 * sizeof(uint32_t)); - if (ret) { - error_report("could not set interrupts property of node %s", - nodename); - } g_free(irq_attr); -fail_reg: g_free(reg_attr); g_free(nodename); - return ret; + return 0; } /* AMD xgbe properties whose values are copied/pasted from host */