Re: [PATCH] x86/kaslr: remove useless code in mem_avoid_memmap

2019-08-22 Thread Qian Cai
On Thu, 2019-08-22 at 21:26 +0800, Baoquan He wrote: > On 08/22/19 at 08:32am, Qian Cai wrote: > > MAX_MEMMAP_REGIONS is a macro that equal to 4. "i" is static local > > variable that default to 0. The comparison "i >= MAX_MEMMAP_REGIONS" > > will always be false. > > Seems not true. mem_avoid_mem

Re: [PATCH] x86/kaslr: remove useless code in mem_avoid_memmap

2019-08-22 Thread Baoquan He
On 08/22/19 at 08:32am, Qian Cai wrote: > MAX_MEMMAP_REGIONS is a macro that equal to 4. "i" is static local > variable that default to 0. The comparison "i >= MAX_MEMMAP_REGIONS" > will always be false. Seems not true. mem_avoid_memmap() could be invoked many times if multiple memmap= added. It w

[PATCH] x86/kaslr: remove useless code in mem_avoid_memmap

2019-08-22 Thread Qian Cai
MAX_MEMMAP_REGIONS is a macro that equal to 4. "i" is static local variable that default to 0. The comparison "i >= MAX_MEMMAP_REGIONS" will always be false. Signed-off-by: Qian Cai --- arch/x86/boot/compressed/kaslr.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/x86/boot/compresse