Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH for 6.1.y] LoongArch: Fix build error due to backport
@ 2025-05-04  2:10 Huacai Chen
  2025-05-05  8:57 ` Greg Kroah-Hartman
  2025-05-05 15:13 ` Sasha Levin
  0 siblings, 2 replies; 3+ messages in thread
From: Huacai Chen @ 2025-05-04  2:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Sasha Levin, Huacai Chen
  Cc: Xuerui Wang, stable, loongarch, linux-kernel, Huacai Chen

In 6.1 there is no pmdp_get() definition, so use *pmd directly, in order
to avoid such build error due to a recently backport:

arch/loongarch/mm/hugetlbpage.c: In function 'huge_pte_offset':                                                                                                                
arch/loongarch/mm/hugetlbpage.c:50:25: error: implicit declaration of
function 'pmdp_get'; did you mean 'ptep_get'?
[-Wimplicit-function-declaration]                          
   50 |         return pmd_none(pmdp_get(pmd)) ? NULL : (pte_t *) pmd;                                                                                                         
      |                         ^~~~~~~~                                                                                                                                       
      |                         ptep_get                            

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
---
 arch/loongarch/mm/hugetlbpage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/loongarch/mm/hugetlbpage.c b/arch/loongarch/mm/hugetlbpage.c
index cf3b8785a921..70b4a51885c2 100644
--- a/arch/loongarch/mm/hugetlbpage.c
+++ b/arch/loongarch/mm/hugetlbpage.c
@@ -47,7 +47,7 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr,
 				pmd = pmd_offset(pud, addr);
 		}
 	}
-	return pmd_none(pmdp_get(pmd)) ? NULL : (pte_t *) pmd;
+	return pmd_none(*pmd) ? NULL : (pte_t *) pmd;
 }
 
 /*
-- 
2.47.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-05 15:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-04  2:10 [PATCH for 6.1.y] LoongArch: Fix build error due to backport Huacai Chen
2025-05-05  8:57 ` Greg Kroah-Hartman
2025-05-05 15:13 ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox