On 01/30/2018 03:34 AM, Thierry Reding wrote:
From: Thierry Reding <tred...@nvidia.com>

Memory banks with address 0 and size 0 are empty and should not be
passed to the OS via device tree.

        if (!banks)
                return 0;
+ for (i = 0; i < banks; i++)
+               if (start[i] == 0 && size[i] == 0)
+                       break;
+
+       banks = i;

Do we want to move the for loop above the check for if (!banks)?

Should we put braces around the multi-line body of the for loop?

Aside from that,
Acked-by: Stephen Warren <swar...@nvidia.com>

+
        len = fdt_pack_reg(blob, tmp, start, size, banks);
err = fdt_setprop(blob, nodeoffset, "reg", tmp, len);
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to