Re: [PATCH] of/fdt: Remove duplicate check in early_init_dt_scan_memory()

2020-08-17 Thread Qi Zheng
On 2020/8/18 上午2:21, Rob Herring wrote: On Fri, Aug 14, 2020 at 4:57 PM Qi Zheng wrote: When the value of the first reg is not NULL, there will be two repeated checks. So modify it. I prefer the way it was. I'm sure the compiler is smart enough to throw out the 2nd check. Plus,

Re: [PATCH] of/fdt: Remove duplicate check in early_init_dt_scan_memory()

2020-08-17 Thread Rob Herring
On Fri, Aug 14, 2020 at 4:57 PM Qi Zheng wrote: > > When the value of the first reg is not NULL, there will be > two repeated checks. So modify it. I prefer the way it was. I'm sure the compiler is smart enough to throw out the 2nd check. Plus, 'linux,usable-memory' being present is the

[PATCH] of/fdt: Remove duplicate check in early_init_dt_scan_memory()

2020-08-14 Thread Qi Zheng
When the value of the first reg is not NULL, there will be two repeated checks. So modify it. Signed-off-by: Qi Zheng --- drivers/of/fdt.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 4602e467ca8b..f54412c00642 100644 ---