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

Reply via email to