[Crash-utility] [PATCH] crash/ppc64: Remove redundant PTE checks.
HAGIO KAZUHITO(萩尾 一仁)
k-hagio-ab at nec.com
Thu Jun 22 00:21:51 UTC 2023
On 2023/06/20 11:27, HAGIO KAZUHITO(萩尾 一仁) wrote:
> On 2023/06/16 20:55, Likhitha Korrapati wrote:
>> Patch removes redundant checks for PTE (Page Table Entry) because those
>> conditions are already covered.
>>
>> if (!(pte & _PAGE_PRESENT)) {
>> ...
>> return FALSE;
>> }
>>
>> if (!pte)
>> return FALSE;
>>
>> The second pte check is redundant because it holds true only when pte is
>> 0. if pte is 0 then (!(pte & _PAGE_PRESENT)) is true and it will return
>> false. so there is no need for one more pte check.
>>
>> Signed-off-by: Likhitha Korrapati <likhitha at linux.ibm.com>
>
> thanks for the cleanup.
>
> Acked-by: Kazuhito Hagio <k-hagio-ab at nec.com>
with Lianbo's ack, applied.
https://github.com/crash-utility/crash/commit/8b24b2025fb4ae9bd6102bb054bd23987c35387e
Thanks,
Kazu
More information about the Crash-utility
mailing list