mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
sh/mm: stop using pgd_ERROR()
Stop using pgd_ERROR() in __get_pte_phys() when page table entry is already known to be empty. Link: https://lore.kernel.org/20260831054331.625505-8-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: David Hildenbrand (Arm) <david@kernel.org> Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Rich Felker <dalias@libc.org> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Helge Deller <deller@gmx.de> Cc: Huacai Chen <chenhuacai@kernel.org> Cc: James Bottomley <james.bottomley@HansenPartnership.com> Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Samuel Holland <samuel.holland@sifive.com> Cc: WANG Xuerui <kernel@xen0n.name>
This commit is contained in:
parent
3b225ce37f
commit
66a0441a17
|
|
@ -52,10 +52,8 @@ static pte_t *__get_pte_phys(unsigned long addr)
|
|||
pmd_t *pmd;
|
||||
|
||||
pgd = pgd_offset_k(addr);
|
||||
if (pgd_none(*pgd)) {
|
||||
pgd_ERROR(*pgd);
|
||||
if (pgd_none(*pgd))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
p4d = p4d_alloc(NULL, pgd, addr);
|
||||
if (unlikely(!p4d)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user