Hi qiwu,

On Tue, Sep 10, 2024 at 7:14 PM <qiwu.c...@transsion.com> wrote:
>
> Hi Tao,
> >
> > On Tue, Sep 10, 2024 at 3:20 PM <qiwu.chen(a)transsion.com&gt; wrote:
> >
> > Can we remove this one? I see the value has been changed into a new
> > one since v6.11-rc1.
> >
> > PAGE_TYPE_BASE = 0x80000000
> >
> > Is keeping the value hard coded here necessary?
> >
> I don't think so, since the value can be got from vmcoreinfo after kernel 
> commit ff202303c398e,
> keeping the value hard before kernel commit ff202303c398e:
>   #define PAGE_TYPE_BASE        0xf0000000
>
> So just keeping the original code will get the correct value for any kernel 
> version.
>

Oh I see, it makes sense. How about adding code comments for
PAGE_TYPE_BASE. E.g.

/*
* Before kernel commit ff202303c398e, the value is defined as a macro,
so copy it here;
* After this commit, the value is defined as an enum, which can be
evaluated at runtime.
*/
PAGE_TYPE_BASE = 0x80000000


> >
> > The variable name "pp" doesn't make sense. No one knows what pp is
> > until you read its context.
> >
> Okay, how about renaming "pp" to "page"?

OK, sounds good.

Thanks,
Tao Liu

>
> 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
--
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