
30 Jan
2018
30 Jan
'18
6:59 p.m.
On 01/30/2018 03:34 AM, Thierry Reding wrote:
From: Thierry Reding treding@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 swarren@nvidia.com
len = fdt_pack_reg(blob, tmp, start, size, banks);
err = fdt_setprop(blob, nodeoffset, "reg", tmp, len);