Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp409321ybh; Tue, 10 Mar 2020 00:52:51 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuhGrEoheg1H7AiKD6X5Wrl6JHigVU03+FQPqF2PHqUeEksVGB0oCe04PDu78wMK8jAIRTm X-Received: by 2002:aca:ea46:: with SMTP id i67mr224964oih.149.1583826770909; Tue, 10 Mar 2020 00:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583826770; cv=none; d=google.com; s=arc-20160816; b=KEJdOgeQhdpGb0GX+gDke5wc4n2QlS0/K880WmLAzrceJ4sAMwMboMPlkDcD0Xtj9j 5znsomjEVhvTLFZPrLS06PPnWWiGAJMde9OFEf2N2PDQQeAIJMDdDid4Gye6krV+kE5i 0wD5VWrREA5Ml5eae9m1yo8w1cjCkgIRi6b/vEjRZUNGsC4bBG/QlFoo1WUDoGAR6OHl +eXrhoUe5/p+xiIf9jxyw4/Xl/k26r4S5X9YzYamorYUz5gfF6X5bGD8Q1P5535fAFhW rC/1rblpaT2+ltP29VPAckRfzxyk4Pgx3fNj8XDxFBuRX+QE6R37CEqPNSCfuSUHbfef IvqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=QSYkIgLvQ0/pDB5G3G3puXNd0433wtDVt3LQvZi2eLo=; b=twEb8yTHr2CTpngeU48KiigyGyfg1S3hkOPx2obQDhTiR9xMDFiUES4OGZut2jxoS2 vQcMGG80ooHGti9WR/kmlMjnrPDd2mKOPQxczVnzCTRiNdabDnNnaNletwYgKb64I/5r qN2aaDoF86Bu0Q8qMCglb2LwE+gy9Zthso5cThgEvJMe6/5QIlFgt/YnDyDGDSU/A3j1 huq1SDwGntTowGLMc0SZOK13OU3cWEFl38947zi3UGTJWThHJD2aQJxzxNO+fo2ON0v9 MdZF3HaifwmZBNchZMfizaVWXLuNjbVwD9ftAJfGupf23csqNUcsCdkRKVk+undpVRLY Z4iQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c6si8029719otk.233.2020.03.10.00.52.38; Tue, 10 Mar 2020 00:52:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726426AbgCJHvD (ORCPT + 99 others); Tue, 10 Mar 2020 03:51:03 -0400 Received: from m17617.mail.qiye.163.com ([59.111.176.17]:14071 "EHLO m17617.mail.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726202AbgCJHvD (ORCPT ); Tue, 10 Mar 2020 03:51:03 -0400 X-Greylist: delayed 592 seconds by postgrey-1.27 at vger.kernel.org; Tue, 10 Mar 2020 03:51:01 EDT Received: from ubuntu.localdomain (unknown [58.251.74.226]) by m17617.mail.qiye.163.com (Hmail) with ESMTPA id 909DA260F0C; Tue, 10 Mar 2020 15:41:05 +0800 (CST) From: WANG Wenhu To: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: wenhu.pku@gmail.com, WANG Wenhu Subject: [PATCH] mm: clarify a confusing comment of remap_pfn_range Date: Tue, 10 Mar 2020 00:39:54 -0700 Message-Id: <20200310073955.43415-1-wenhu.wang@vivo.com> X-Mailer: git-send-email 2.17.1 X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZT1VCQ0lCQkJDS0pNSE5MT1lXWShZQU hPN1dZLVlBSVdZCQ4XHghZQVk1NCk2OjckKS43PlkG X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6Pio6Pjo6Szg4PDwCNU9RGisK NCwKFD5VSlVKTkNIQ0lNS01MQkhIVTMWGhIXVQweFRMOVQwaFRw7DRINFFUYFBZFWVdZEgtZQVlO Q1VJTkpVTE9VSUlNWVdZCAFZQUpNT0o3Bg++ X-HM-Tid: 0a70c363d9669375kuws909da260f0c Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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