qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] sam460ex: Add comment explaining ignored errors from fdt operations
@ 2018-07-05 13:51 Guenter Roeck
  2018-07-05 14:06 ` Paolo Bonzini
  0 siblings, 1 reply; 6+ messages in thread
From: Guenter Roeck @ 2018-07-05 13:51 UTC (permalink / raw)
  To: David Gibson
  Cc: Alexander Graf, qemu-ppc, qemu-devel, Guenter Roeck,
	BALATON Zoltan, Pilippe Mathieu-Daudé, Paolo Bonzini

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-07-09  3:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-05 13:51 [Qemu-devel] [PATCH] sam460ex: Add comment explaining ignored errors from fdt operations Guenter Roeck
2018-07-05 14:06 ` 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

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).