qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-ppc] [PATCH] sam460ex: Add comment explaining ignored errors from


From: Guenter Roeck
Subject: [Qemu-ppc] [PATCH] sam460ex: Add comment explaining ignored errors from fdt operations
Date: Thu, 5 Jul 2018 06:51:24 -0700

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 <address@hidden>
Cc: Pilippe Mathieu-Daudé <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Signed-off-by: Guenter Roeck <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]