From patchwork Wed Jan 6 15:13:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 59252 Delivered-To: patches@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp6636831lbb; Wed, 6 Jan 2016 07:13:42 -0800 (PST) X-Received: by 10.28.139.206 with SMTP id n197mr10341858wmd.20.1452093222531; Wed, 06 Jan 2016 07:13:42 -0800 (PST) Return-Path: Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com. [2a00:1450:400c:c09::22f]) by mx.google.com with ESMTPS id lh8si160370721wjb.110.2016.01.06.07.13.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Jan 2016 07:13:42 -0800 (PST) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 2a00:1450:400c:c09::22f as permitted sender) client-ip=2a00:1450:400c:c09::22f; Authentication-Results: mx.google.com; spf=pass (google.com: domain of eric.auger@linaro.org designates 2a00:1450:400c:c09::22f as permitted sender) smtp.mailfrom=eric.auger@linaro.org; dkim=pass header.i=@linaro.org Received: by mail-wm0-x22f.google.com with SMTP id l65so62839812wmf.1 for ; Wed, 06 Jan 2016 07:13:42 -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=K4npePiVlp7IzNuisXe138R97OdL6p9BCocSVzFXEkU=; b=bE+ptA30HkwursS2i8+4MJOgjK4LHiC5lugBGDP0cbHDFOkKj00ANyl/yL43TQA4DC q8s/acJKznTpQe+ckBjn9ByOKAKcCmuydqY3onMB9cjQwkxIgesPSz1cxE4o6KAMoIxi mTDliqj5JK39xvdFi48YMU7l0wvw0C4t06zmE= 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=K4npePiVlp7IzNuisXe138R97OdL6p9BCocSVzFXEkU=; b=fVnDrwvRpX64anXCq3g+/v3VYakbK9Qf75b+fgg54pNv9I3Hnm73vDlM8kJGUWiTw/ GWl7YPLj7AJA8CK7RVQABG1C6Wosj7WMvH7wS/D4oL9pss1mXAgbs92PSP6SnplFxAzR dVouzehgCVzmQYHBsySLK/N/T2YG166u6biRZ9+9OcK14W0S6aGm87mQdOwbMGXbKTfg 2Qvq4NUZniF2j7TEp8gLobYlsZxvAbbq8BYyhQs5qCito789rlK5mwuUbrkrRhxetQMV TuMC7pNCvlcY7sFAuovEXfaVA8tcSWf/HL3y9A8UzjZR4WE3/AklFndtsru7OVFXvQMS 48AA== X-Gm-Message-State: ALoCoQkXRH6Qth6VhD7K0+8tsl3LhhE9l3W1RYLFJCC2XwaeFriCqjBIJAyCb8CaG3/P1EDlObnPbo5LF1ntRRVS2rVqYn2s0Q== X-Received: by 10.28.224.212 with SMTP id x203mr11016219wmg.29.1452093222353; Wed, 06 Jan 2016 07:13:42 -0800 (PST) Return-Path: Received: from new-host-6.home (LMontsouris-657-1-37-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by smtp.gmail.com with ESMTPSA id df10sm81858826wjb.44.2016.01.06.07.13.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Jan 2016 07:13:41 -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, david@gibson.dropbear.id.au, alex.williamson@redhat.com Cc: alex.bennee@linaro.org, thuth@redhat.com, crosthwaitepeter@gmail.com, patches@linaro.org, christoffer.dall@linaro.org, pbonzini@redhat.com, b.reynal@virtualopensystems.com, suravee.suthikulpanit@amd.com, thomas.lendacky@amd.com Subject: [PATCH v2 7/7] hw/arm/sysbus-fdt: remove qemu_fdt_setprop returned value check Date: Wed, 6 Jan 2016 15:13:25 +0000 Message-Id: <1452093205-30167-8-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1452093205-30167-1-git-send-email-eric.auger@linaro.org> References: <1452093205-30167-1-git-send-email-eric.auger@linaro.org> qemu_fdt_setprop self-exists in case of error hence no need to check the returned value. Signed-off-by: Eric Auger --- hw/arm/sysbus-fdt.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) -- 1.9.1 diff --git a/hw/arm/sysbus-fdt.c b/hw/arm/sysbus-fdt.c index 66fa766..68d7e53 100644 --- a/hw/arm/sysbus-fdt.c +++ b/hw/arm/sysbus-fdt.c @@ -241,12 +241,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++) { @@ -256,14 +252,9 @@ 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;