From patchwork Sun Mar 1 01:42:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenqiwu X-Patchwork-Id: 11414121 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 39836921 for ; Sun, 1 Mar 2020 01:42:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F013F24650 for ; Sun, 1 Mar 2020 01:42:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dIdvpdrb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F013F24650 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 0F8786B0005; Sat, 29 Feb 2020 20:42:08 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0A9E16B0006; Sat, 29 Feb 2020 20:42:08 -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 F09196B0007; Sat, 29 Feb 2020 20:42:07 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0081.hostedemail.com [216.40.44.81]) by kanga.kvack.org (Postfix) with ESMTP id D54076B0005 for ; Sat, 29 Feb 2020 20:42:07 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id A5DC64DDB for ; Sun, 1 Mar 2020 01:42:07 +0000 (UTC) X-FDA: 76545092694.15.stick62_86f6292a6a210 X-Spam-Summary: 2,0,0,350e0b072ad8446d,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.215.194:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.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:24,LUA_SUMMARY:none X-HE-Tag: stick62_86f6292a6a210 X-Filterd-Recvd-Size: 4666 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Sun, 1 Mar 2020 01:42:07 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id u12so3538360pgb.10 for ; Sat, 29 Feb 2020 17:42:07 -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=8sZj70UvpSjFfpt51+BEmcfHhilIbpN5Oq0KKqT0+iM=; b=dIdvpdrbJwofowWp0SpBFuoIO+NPvikDje0J5TIQb3NYGDa+JscGxR11lwueYpUz0Z Ui+nxd+xPguijx+xM7xjTvbLhItBOaWTzt2tw4kLEYlvNaxJS1nSNEgxgX95VqVtmXLK JNI8sNztFpKOlKKle4VrP8qpLXTP0h4haE3yDiMsaArgaQyAdBtySWzvraPhRrHGkv5p VSZo8ejS2kE2vIW3hYquSRihB7FD79iFLJA3MwN4Wnx7fTltfQcUAXN/7nnyTPRj1Yst hrPYkCcz8FGI5i868xLBYcivIWTmvo/yjDebT4NvjiU79NYdlZC9c+2dcF1YafIR8h7o yL4Q== 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=8sZj70UvpSjFfpt51+BEmcfHhilIbpN5Oq0KKqT0+iM=; b=Mnw9FAmL9mSihohVim3I5WZF92fqBXa1MdDt3YA2KHlguf/F3/NfEKNHhEHEdYRG/e oCPWke5+H1nMa0XSxxEexOlXkHLSHQlh93hH8n5IdEAeegsMDF8+zw2NlFi9cY7KuEcF N5xgJah0E/YTUT21UcZJ5yvvkGa24+UWT155NXfNwjwQE1slWgTNjMEW+44PcbGH0h1k AMyYJYcNva1c+FI7sa0jFrxnA8pWSJpId1vjYDnaZip/Jp/ahdfuLiAId14eC+B2DDxk rx8yGVrk6Ye8ksX1QSYZ41jTrBIyw6sXXXzm65rKHJlFsrFEMgtUPNNop9z5EozgogA/ c7Sg== X-Gm-Message-State: APjAAAVkVbDN6udWw3RlhJfcEHChVscC7RpgUVFr7cFkwUAcmi+7cEra Ep01Tt3CBC3Bx6+45xTtSRc= X-Google-Smtp-Source: APXvYqxbgmdVIEKE18iTpVnTx1JLMsXG61wKE9OG7cslrKAwGPnTLPR0ZnrtrG/kUe7Zbv4Fhj7fwQ== X-Received: by 2002:a62:fcd8:: with SMTP id e207mr10970600pfh.160.1583026926247; Sat, 29 Feb 2020 17:42:06 -0800 (PST) Received: from localhost ([43.224.245.179]) by smtp.gmail.com with ESMTPSA id g2sm15688767pgj.45.2020.02.29.17.42.05 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sat, 29 Feb 2020 17:42:05 -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 v2] mm: fix ambiguous comments for better code readability Date: Sun, 1 Mar 2020 09:42:01 +0800 Message-Id: <1583026921-15279-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..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.