Hi Tao,
> I would prefer to exchange the if else sequence, to be:
> 
> /* The global symbol of vmemmap is removed since kernel commit 7bc1a0f9e1765 
> */
> if (kernel_symbol_exists("vmemmap"))
>     ms->vmemmap = symbol_value("vmemmap");
> else
>     ms->vmemmap = ms->vmemmap_vaddr - ((ms->phys_offset >>
> machdep->pageshift) * ms->struct_page_size);
> 
> This would be more readable, if a symbol exists, then read the symbol,
> otherwise calc it out.
> 
I agree with your exchange.
Thanks
Qiwu
--
Crash-utility mailing list -- devel@lists.crash-utility.osci.io
To unsubscribe send an email to devel-le...@lists.crash-utility.osci.io
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
Contribution Guidelines: https://github.com/crash-utility/crash/wiki

Reply via email to