From patchwork Sat Feb 29 15:25:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenqiwu X-Patchwork-Id: 11413903 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5B7DA930 for ; Sat, 29 Feb 2020 15:25:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 28AB8246B0 for ; Sat, 29 Feb 2020 15:25:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="j1sBv1jO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28AB8246B0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 276776B0005; Sat, 29 Feb 2020 10:25:58 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 226D26B0006; Sat, 29 Feb 2020 10:25:58 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 13C996B0007; Sat, 29 Feb 2020 10:25:58 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0219.hostedemail.com [216.40.44.219]) by kanga.kvack.org (Postfix) with ESMTP id F00346B0005 for ; Sat, 29 Feb 2020 10:25:57 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 9AD62181AC212 for ; Sat, 29 Feb 2020 15:25:57 +0000 (UTC) X-FDA: 76543539954.22.camp69_8b4d577c19d62 X-Spam-Summary: 2,0,0,1a8ead76fb94cd15,d41d8cd98f00b204,qiwuchen55@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1345:1437:1534:1541:1711:1730:1747:1777:1792:2194:2199:2393:2553:2559:2562:2693:2897:3138:3139:3140:3141:3142:3353:3865:3866:3867:3870:3871:3874:4250:4321:4605:5007:6119:6261:6653:6737:7576:7875:7903:8603:9413:10004:10903:11026:11658:11914:12048:12296:12297:12517:12519:12555:12679:12895:13069:13161:13229:13311:13357:14096:14181:14384:14394:14721:21080:21433:21444:21451:21627:21666:21795:30003:30012:30034:30051:30054:30090,0,RBL:209.85.210.194:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:26,LUA_SUMMARY:none X-HE-Tag: camp69_8b4d577c19d62 X-Filterd-Recvd-Size: 4682 Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Sat, 29 Feb 2020 15:25:57 +0000 (UTC) Received: by mail-pf1-f194.google.com with SMTP id 15so3297369pfo.9 for ; Sat, 29 Feb 2020 07:25:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=/titzftjDVhsWttfwCh6dOM69CRoYskk/u3yGmZLRqs=; b=j1sBv1jOO2lRSXjvZ70Sg9lTlPJNOcyNU//Kl1jBFNvh4a5F+IG8fyHKbelZOsDcGT 2/oH+iTcOrnbKUcokUjvrqFMDUti1rQx0HtOpVPGbEB0kSP81A4qR67fcjXMM6ZAceba KdP+pxd10NgIV6L3YvC14cB01PoeW7Y+vji5ZV6+rkT93vOYO8q2qqBjeZuaJ1LD0u1U gZ3C9AgCGsDX8IC6XmV6Q/16/CwXEI1lAqghubWNZdSxQfrEBSQIulI0J+oaTasYL6NT RvkiJZIUysHQqQ7UX6nE5hN6xuW7KVTscZ7dlTQgYwx9OJZYPxXkMFu+G2hJXe/vyQvl VVUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=/titzftjDVhsWttfwCh6dOM69CRoYskk/u3yGmZLRqs=; b=JCjJPScNenV71sP8JUyIpxZteFr0yDpjVpxIF4uwv1Q8duxjR3Q00HNtJDEcmbpvZF SrZFNcoJh/cN3mCFwtfMoS0ebnUUjDtHQacRtI8dVfZRXSMk5TXpLqHdmxodDoopVrVE 9YXFhA3msUfrAsAgtu3MlT2WvZt/GGnAtctG4eaAIRMH3tAJ7VZ32fwDu0IZFyX4EFvJ 6uC3oah4rCSUiplZnkk9II3NHh3onomLIyy0/ehacpq4mDVLhJl2y2OtK9iTvQ9h5uUI rV+nR+F6MjvoIoJCNWwxBox0Iy5eaRU1zvzx/icZNCEyThizvaBDEUyvkw6QUmJv4kpy lxUg== X-Gm-Message-State: APjAAAUZhBZV0EVRbuZqUbuAV8je7OY1qkTi/pJqsfqQ8XBm8EgWl2w6 3cyBef6UGav/VPaNdoZMCog= X-Google-Smtp-Source: APXvYqyveklsi8nzXyJ+ZD8gsLjsoQ9CYNlVblfzURiERUB1QrqvTBHZpU3oKNpXHR6SsHGfBJZxfA== X-Received: by 2002:aa7:9419:: with SMTP id x25mr9843772pfo.62.1582989956179; Sat, 29 Feb 2020 07:25:56 -0800 (PST) Received: from localhost ([43.224.245.179]) by smtp.gmail.com with ESMTPSA id i197sm11274523pfe.137.2020.02.29.07.25.54 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sat, 29 Feb 2020 07:25:55 -0800 (PST) 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 Subject: [PATCH] mm: fix ambiguous comments for better code readability Date: Sat, 29 Feb 2020 23:25:49 +0800 Message-Id: <1582989949-9939-1-git-send-email-qiwuchen55@gmail.com> X-Mailer: git-send-email 1.9.1 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: chenqiwu 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 --- 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..778aa00 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: remap pfn converted by physical address 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.