Skip to contentSkip to conversation

x86/xen: Remove the unused function p2m_top_mfn_init()

PATCH Superseded Jiapeng Chong 2 participants 2 messages Dec 27, 2022 – Jan 4, 2023

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/xen: Remove the unused function p2m_top_mfn_init()

The function p2m_top_mfn_init is defined in the p2m.c file, but not called elsewhere, so remove this unused function.

arch/x86/xen/p2m.c:137:24: warning: unused function 'p2m_index'.

---
 arch/x86/xen/p2m.c | 5 -----
 1 file changed, 5 deletions(-)
arch/x86/xen/p2m.c +0 -5
index 58db86f7b384..9bdc3b656b2c 100644
@@ -134,11 +134,6 @@ static inline unsigned p2m_mid_index(unsigned long pfn)
 	return (pfn / P2M_PER_PAGE) % P2M_MID_PER_PAGE;
 }
 
-static inline unsigned p2m_index(unsigned long pfn)
-{
-	return pfn % P2M_PER_PAGE;
-}
-
 static void p2m_top_mfn_init(unsigned long *top)
 {
 	unsigned i;
Signature · 1 line
2.20.1.7.g153144c
#1 lore raw
Quoted 2 lines · Jiapeng Chong

The function p2m_top_mfn_init is defined in the p2m.c file, but not called elsewhere, so remove this unused function.

This and the title are wrong - p2m_top_mfn_init() is used by xen_build_mfn_list_list().

Quoted 1 line

arch/x86/xen/p2m.c:137:24: warning: unused function 'p2m_index'.

Whereas this and the actual code change look correct to me.

Jan