From: Guenter Roeck <linux@roeck-us.net>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: "Alexander Graf" <agraf@suse.de>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
"Guenter Roeck" <linux@roeck-us.net>,
"BALATON Zoltan" <balaton@eik.bme.hu>,
"Pilippe Mathieu-Daudé" <f4bug@amsat.org>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: [Qemu-devel] [PATCH] sam460ex: Add comment explaining ignored errors from fdt operations
Date: Thu, 5 Jul 2018 06:51:24 -0700 [thread overview]
Message-ID: <1530798684-23009-1-git-send-email-linux@roeck-us.net> (raw)
Failing to set serial port clock frequencies is not fatal. Add a comment
into the code explaining this, and typecast the function to void to
silence static analyzers.
Cc: BALATON Zoltan <balaton@eik.bme.hu>
Cc: Pilippe Mathieu-Daudé <f4bug@amsat.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
hw/ppc/sam460ex.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
index 7eed2ec..b004cda 100644
--- a/hw/ppc/sam460ex.c
+++ b/hw/ppc/sam460ex.c
@@ -324,7 +324,10 @@ static int sam460ex_load_device_tree(hwaddr addr,
/* set serial port clocks */
offset = fdt_node_offset_by_compatible(fdt, -1, "ns16550");
while (offset >= 0) {
- fdt_setprop_cell(fdt, offset, "clock-frequency", UART_FREQ);
+ /* Failure to set serial port clocks is not fatal, so just ignore
+ * errors when trying to do so.
+ */
+ (void)fdt_setprop_cell(fdt, offset, "clock-frequency", UART_FREQ);
offset = fdt_node_offset_by_compatible(fdt, offset, "ns16550");
}
--
2.7.4
next reply other threads:[~2018-07-05 13:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-05 13:51 Guenter Roeck [this message]
2018-07-05 14:06 ` [Qemu-devel] [PATCH] sam460ex: Add comment explaining ignored errors from fdt operations Paolo Bonzini
2018-07-06 1:18 ` David Gibson
2018-07-06 12:41 ` Paolo Bonzini
2018-07-07 21:23 ` Guenter Roeck
2018-07-09 3:55 ` David Gibson
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=1530798684-23009-1-git-send-email-linux@roeck-us.net \
--to=linux@roeck-us.net \
--cc=agraf@suse.de \
--cc=balaton@eik.bme.hu \
--cc=david@gibson.dropbear.id.au \
--cc=f4bug@amsat.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/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).