On 28.03.24 09:46, Christoph Hellwig wrote:
follow_phys is only used by two callers in arch/x86/mm/pat/memtype.c.
Move it there and hardcode the two arguments that get the same values
passed by both callers.
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
arch/x86/mm/pat/memtype.c | 23 +++++++++++++++++++++--
include/linux/mm.h | 2 --
mm/memory.c | 28 ----------------------------
3 files changed, 21 insertions(+), 32 deletions(-)
diff --git a/arch/x86/mm/pat/memtype.c b/arch/x86/mm/pat/memtype.c
index 0d72183b5dd028..c64f07b0fc2099 100644
--- a/arch/x86/mm/pat/memtype.c
+++ b/arch/x86/mm/pat/memtype.c
@@ -947,6 +947,25 @@ static void free_pfn_range(u64 paddr, unsigned long size)
memtype_free(paddr, paddr + size);
}
+static int follow_phys(struct vm_area_struct *vma, unsigned long *prot,
+ resource_size_t *phys)
+{
With an implicit lookup address, the function name is a bit unfortunate.
"lookup_vma_pat_info()" ... not sure.
Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>
--
Cheers,
David / dhildenb