linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: qiwuchen55@gmail.com
To: akpm@linux-foundation.org, jgg@ziepe.ca, mhocko@suse.com,
	kirill.shutemov@linux.intel.com, vbabka@suse.cz,
	yang.shi@linux.alibaba.com, dan.j.williams@intel.com,
	jhubbard@nvidia.com, thellstrom@vmware.com, jrdr.linux@gmail.com,
	mathieu.desnoyers@efficios.com, rcampbell@nvidia.com
Cc: linux-mm@kvack.org, chenqiwu <chenqiwu@xiaomi.com>
Subject: [PATCH v2] mm: fix ambiguous comments for better code readability
Date: Sun,  1 Mar 2020 09:42:01 +0800	[thread overview]
Message-ID: <1583026921-15279-1-git-send-email-qiwuchen55@gmail.com> (raw)

From: chenqiwu <chenqiwu@xiaomi.com>

The parameter of remap_pfn_range() @pfn passed from the caller is
actually a page-frame number converted by corresponding physical
address of kernel memory, the original comment is ambiguous that
may mislead the users.

Meanwhile, there is an ambiguous typo "VMM" in the comment of
vm_area_struct. So fixing them will make the code more readable.

Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
---
 include/linux/mm_types.h | 4 ++--
 mm/memory.c              | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index dd555e6..4aba6c0 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -289,8 +289,8 @@ struct vm_userfaultfd_ctx {
 #endif /* CONFIG_USERFAULTFD */
 
 /*
- * This struct defines a memory VMM memory area. There is one of these
- * per VM-area/task.  A VM area is any part of the process virtual memory
+ * This struct describes a virtual memory area. There is one of these
+ * per VM-area/task. A VM area is any part of the process virtual memory
  * space that has a special rule for the page-fault handlers (ie a shared
  * library, the executable area etc).
  */
diff --git a/mm/memory.c b/mm/memory.c
index ce4b2b9..e51e6f6 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1948,8 +1948,8 @@ 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
- * @size: size of map area
+ * @pfn: page frame number of kernel memory
+ * @size: size of mapping area
  * @prot: page protection flags for this mapping
  *
  * Note: this is only safe if the mm semaphore is held when called.
-- 
1.9.1



                 reply	other threads:[~2020-03-01  1:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1583026921-15279-1-git-send-email-qiwuchen55@gmail.com \
    --to=qiwuchen55@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=chenqiwu@xiaomi.com \
    --cc=dan.j.williams@intel.com \
    --cc=jgg@ziepe.ca \
    --cc=jhubbard@nvidia.com \
    --cc=jrdr.linux@gmail.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-mm@kvack.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhocko@suse.com \
    --cc=rcampbell@nvidia.com \
    --cc=thellstrom@vmware.com \
    --cc=vbabka@suse.cz \
    --cc=yang.shi@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).