summaryrefslogtreecommitdiff
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2025-09-08 18:11:02 +0100
committerAndrew Morton <akpm@linux-foundation.org>2025-09-21 14:22:27 -0700
commit90ec2df9dd31653ceac4a35d2440b108bdf27550 (patch)
tree8afc055329653dc307a9bcba0efd87b75b43578a /include/linux/mm.h
parentf0c92726e89f5c6c092526787465617a68af154f (diff)
ptdesc: remove ptdesc_to_virt()
This has the same effect as ptdesc_address() so convert the callers to use that and delete the function. Add kernel-doc for ptdesc_address(). Link: https://lkml.kernel.org/r/20250908171104.2409217-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Acked-by: David Hildenbrand <david@redhat.com> Cc: Vishal Moola (Oracle) <vishal.moola@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 25f56e209ec8..da6e0abad2cb 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2944,11 +2944,12 @@ static inline struct ptdesc *virt_to_ptdesc(const void *x)
return page_ptdesc(virt_to_page(x));
}
-static inline void *ptdesc_to_virt(const struct ptdesc *pt)
-{
- return page_to_virt(ptdesc_page(pt));
-}
-
+/**
+ * ptdesc_address - Virtual address of page table.
+ * @pt: Page table descriptor.
+ *
+ * Return: The first byte of the page table described by @pt.
+ */
static inline void *ptdesc_address(const struct ptdesc *pt)
{
return folio_address(ptdesc_folio(pt));