qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Auger <eric.auger@linaro.org>
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: 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 v3 8/8] hw/arm/sysbus-fdt: remove qemu_fdt_setprop returned value check
Date: Thu,  7 Jan 2016 15:50:15 +0000	[thread overview]
Message-ID: <1452181815-1948-9-git-send-email-eric.auger@linaro.org> (raw)
In-Reply-To: <1452181815-1948-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 <eric.auger@linaro.org>
---
 hw/arm/sysbus-fdt.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

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;
-- 
1.9.1

      parent reply	other threads:[~2016-01-07 15:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-07 15:50 [Qemu-devel] [PATCH v3 0/8] AMD XGBE KVM platform passthrough Eric Auger
2016-01-07 15:50 ` [Qemu-devel] [PATCH v3 1/8] hw/vfio/platform: amd-xgbe device Eric Auger
2016-01-07 15:50 ` [Qemu-devel] [PATCH v3 2/8] device_tree: introduce load_device_tree_from_sysfs Eric Auger
2016-01-07 15:50 ` [Qemu-devel] [PATCH v3 3/8] device_tree: introduce qemu_fdt_node_path Eric Auger
2016-01-07 15:50 ` [Qemu-devel] [PATCH v3 4/8] device_tree: qemu_fdt_getprop converted to use the error API Eric Auger
2016-01-07 15:50 ` [Qemu-devel] [PATCH v3 5/8] device_tree: qemu_fdt_getprop_cell " Eric Auger
2016-01-07 15:50 ` [Qemu-devel] [PATCH v3 6/8] hw/arm/sysbus-fdt: helpers for clock node generation Eric Auger
2016-01-07 15:50 ` [Qemu-devel] [PATCH v3 7/8] hw/arm/sysbus-fdt: enable amd-xgbe dynamic instantiation Eric Auger
2016-01-07 15:50 ` Eric Auger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452181815-1948-9-git-send-email-eric.auger@linaro.org \
    --to=eric.auger@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=alex.williamson@redhat.com \
    --cc=b.reynal@virtualopensystems.com \
    --cc=christoffer.dall@linaro.org \
    --cc=crosthwaitepeter@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=eric.auger@st.com \
    --cc=patches@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=thomas.lendacky@amd.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).