|
From: | Alexey Kardashevskiy |
Subject: | Re: [PATCH qemu v22] spapr: Implement Open Firmware client interface |
Date: | Thu, 8 Jul 2021 16:38:18 +1000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:89.0) Gecko/20100101 Thunderbird/89.0 |
On 08/07/2021 12:40, David Gibson wrote:
[snip]+static uint32_t vof_getprop(const void *fdt, uint32_t nodeph, uint32_t pname, + uint32_t valaddr, uint32_t vallen) +{ + char propname[OF_PROPNAME_LEN_MAX + 1]; + uint32_t ret = 0; + int proplen = 0; + const void *prop; + char trval[64] = ""; + int nodeoff = fdt_node_offset_by_phandle(fdt, nodeph); + bool write0; + + if (nodeoff < 0) { + return -1;Shouldn't many of these explicit -1s be PROM_ERR, since you defined it?
It is defined in the firmware only and I forgot why :) pc-bios/vof/ci.c|72 col 16| return PROM_ERROR; pc-bios/vof/vof.h|13 col 9| #define PROM_ERROR (-1u) I'll just ditch it, does not seem helping with anything. -- Alexey
[Prev in Thread] | Current Thread | [Next in Thread] |