On Thu, Jul 05, 2018 at 04:06:28PM +0200, Paolo Bonzini wrote: > On 05/07/2018 15:51, Guenter Roeck wrote: > > + /* 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"); > > Ok, but why would it even fail? Maybe it's not this case, but even if > it's not fatal for the OS, generating different device trees silently > seems like a recipe for Heisenbugs.
Yes, quite. Especially since the most likely errors I can see here would actually indicate something has already gone horribly wrong with the device tree construction, so a missing clock-frequency is the least of our troubles. I think using _FDT() here would be a better approach. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature