linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: clarify a confusing comment of remap_pfn_range
@ 2020-03-10  7:39 WANG Wenhu
  0 siblings, 0 replies; only message in thread
From: WANG Wenhu @ 2020-03-10  7:39 UTC (permalink / raw)
  To: Andrew Morton, linux-mm, linux-kernel; +Cc: wenhu.pku, WANG Wenhu

It really made me scratching my head. Replace the comment
with an accurate and consistent description.

The parameter pfn actually referes to the page frame number
which is right-shifted by PAGE_SHIFT from the physical address.

Signed-off-by: WANG Wenhu <wenhu.wang@vivo.com>
---
 mm/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memory.c b/mm/memory.c
index e8bfdf0d9d1d..583f84519870 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1939,7 +1939,7 @@ static inline int remap_p4d_range(struct mm_struct *mm, pgd_t *pgd,
  * remap_pfn_range - remap kernel memory to userspace
  * @vma: user vma to map to
  * @addr: target user address to start at
- * @pfn: physical address of kernel memory
+ * @pfn: page frame number of kernel physical memory address
  * @size: size of map area
  * @prot: page protection flags for this mapping
  *
-- 
2.17.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-10  7:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10  7:39 [PATCH] mm: clarify a confusing comment of remap_pfn_range WANG Wenhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).