From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D60DBC433F5 for ; Tue, 17 May 2022 23:39:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 713BD6B0074; Tue, 17 May 2022 19:39:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 675438D0003; Tue, 17 May 2022 19:39:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4A0D28D0002; Tue, 17 May 2022 19:39:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 384696B0074 for ; Tue, 17 May 2022 19:39:24 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 145E381AB0 for ; Tue, 17 May 2022 23:39:24 +0000 (UTC) X-FDA: 79476853848.19.DDA8415 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf23.hostedemail.com (Postfix) with ESMTP id 6C7AF1400C8 for ; Tue, 17 May 2022 23:39:06 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E35456148E; Tue, 17 May 2022 23:39:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61B56C34113; Tue, 17 May 2022 23:39:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1652830761; bh=DYhSZ/O62I4Crb1ZNQ+ZR5YdD+tNOlwAMSsZrQo5gN8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DZeoPPF1nzwVDzxfgvPZDVO3laua5IfcOil2yyYQ2JJ1pjuVYW+IFsFJfb53rPHqf gCfzsFxqx351DjibuG96lay3Uj4JO1eb60m10BRWi1zIkH7efSBOmyF6mI+v9bQzQx fOLMmO2DB5aZ2GcNhNV7dwhXa6EplqpPqyOo6yaQ= Date: Tue, 17 May 2022 16:39:20 -0700 From: Andrew Morton To: Miaohe Lin Cc: David Hildenbrand , , , , , , , , , , Subject: Re: [PATCH 14/15] mm/swap: fix the comment of get_kernel_pages Message-Id: <20220517163920.f38bca025e9c8cf946815b11@linux-foundation.org> In-Reply-To: <639dfeab-d81b-3da1-1da4-52447c8a6b95@huawei.com> References: <20220509131416.17553-1-linmiaohe@huawei.com> <20220509131416.17553-15-linmiaohe@huawei.com> <3f9e663a-2045-81d1-509e-abbe0e1fa14e@redhat.com> <639dfeab-d81b-3da1-1da4-52447c8a6b95@huawei.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 6C7AF1400C8 X-Stat-Signature: joqigf4jfzjtcdcee7pw9u9ua7zirakt Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=DZeoPPF1; dmarc=none; spf=pass (imf23.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1652830746-807673 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: On Fri, 13 May 2022 14:15:38 +0800 Miaohe Lin wrote: > On 2022/5/12 21:45, David Hildenbrand wrote: > > On 09.05.22 15:14, Miaohe Lin wrote: > >> If no pages were pinned, 0 is returned in fact. Fix the corresponding > >> comment. > >> > >> Signed-off-by: Miaohe Lin > >> --- > >> mm/swap.c | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/mm/swap.c b/mm/swap.c > >> index 6d2c37f781f8..236b37663a1a 100644 > >> --- a/mm/swap.c > >> +++ b/mm/swap.c > >> @@ -168,8 +168,8 @@ EXPORT_SYMBOL(put_pages_list); > >> * > >> * Returns number of pages pinned. This may be fewer than the number > >> * requested. If nr_pages is 0 or negative, returns 0. If no pages > > > > Ehm, there is only "nr_segs", no "nr_pages" :/ Want to fix that up in > > the same patch? > > Will do. I also reflowed that comment to use more columns. --- a/mm/swap.c~mm-swap-fix-the-comment-of-get_kernel_pages-fix +++ a/mm/swap.c @@ -166,10 +166,10 @@ EXPORT_SYMBOL(put_pages_list); * @pages: array that receives pointers to the pages pinned. * Should be at least nr_segs long. * - * Returns number of pages pinned. This may be fewer than the number - * requested. If nr_pages is 0 or negative, returns 0. If no pages - * were pinned, returns 0. Each page returned must be released with - * a put_page() call when it is finished with. + * Returns number of pages pinned. This may be fewer than the number requested. + * If nr_segs is 0 or negative, returns 0. If no pages were pinned, returns 0. + * Each page returned must be released with a put_page() call when it is + * finished with. */ int get_kernel_pages(const struct kvec *kiov, int nr_segs, int write, struct page **pages) _