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 X-Spam-Level: X-Spam-Status: No, score=-23.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB1FCC433ED for ; Mon, 17 May 2021 17:17:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 866C36128A for ; Mon, 17 May 2021 17:17:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 866C36128A Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 03FB56B007B; Mon, 17 May 2021 13:17:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F32FC6B007D; Mon, 17 May 2021 13:17:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DFAF78D0001; Mon, 17 May 2021 13:17:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0241.hostedemail.com [216.40.44.241]) by kanga.kvack.org (Postfix) with ESMTP id ACE7A6B007B for ; Mon, 17 May 2021 13:17:57 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 4D3A68249980 for ; Mon, 17 May 2021 17:17:57 +0000 (UTC) X-FDA: 78151380594.21.F268ED4 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by imf21.hostedemail.com (Postfix) with ESMTP id A77D6E00010F for ; Mon, 17 May 2021 17:17:56 +0000 (UTC) Received: by mail-wm1-f51.google.com with SMTP id u4-20020a05600c00c4b02901774b80945cso2148782wmm.3 for ; Mon, 17 May 2021 10:17:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pY3ANxAOBaVfEjUQZg4WgknFV4zz3Y66bluELUvePBo=; b=wJ7BKxpIkvCl3vv7D2rP9P4/S6abZ5jx5Trw0yq7fUf/E6lRtPvSxq2JFJv3Q8YZIb XnDZwd6j/pdFKV2DLh1Ec82rQ5mCvmj2ZONRd02+AV0sQHPpQDXd3/pisqOq7BAGXjqm KnrApS4TO106wWB0qOZS7QAs81lQMqQiKmCCacHHpTEuA/LZesD+ArPiwZQF3HsHt0ul Qsf5f1tVdAUOCZ7DtYxZnD4BpNtP3u2eeSyQY3aASO8eJfV0NopgxAc0TxwynBJjWRky bW3tWKW4ETDowJPTydL71k61J2zlYVWY6rzxVlaqsUgqDje6e1y/mzztSkk+rEvWsLld mTNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pY3ANxAOBaVfEjUQZg4WgknFV4zz3Y66bluELUvePBo=; b=DchPPbZzurTzoMksXtm4ER2JJ+3qrzVesm4lT56zUxg+Sh0QDNSl7NJqMz+wzvUNIU VmirbPe2DUgp9V/Wh5x5Fd6Ci1+pFbrVTw7rfDi6HldBqOEcq8qm3zU0dDW71OE6PqSk NOtvUKKoMjnUjPGggwvNbJPfjmPH0jUYU9MqTMiLX3mMP1tFmFyryaN6cpE61KqXSRIb T9ZGgVxSgUu6KMv2MrI6Q6d57p8xRVbQ5k+RHMCVr/Jm9IAdm4o1oUegVIctPyg2mKzH a6cJj+yHtj4yFYjwPTeTjyaGO74L2hr7lEOHGgXmHQ/yDPLPnSXDmu5js60yTQw4f9iA hwTg== X-Gm-Message-State: AOAM532Yr2qehnHL12eYPo2ij4WUvAMul8iQolnm1mgPrpdkV/f6lDGC s6pfPvMaMJi/EMiUvEyeRYKq6+nudjqDuB8jXPDlrA== X-Google-Smtp-Source: ABdhPJyk31Drh7yiZ2RIF4bUOXhd84GLfFrtpDSqmQkh2RAbGt22wOr+2d0AETWWZaS0ob5YAriNmez40X1eQYiL1mo= X-Received: by 2002:a7b:c14f:: with SMTP id z15mr129680wmi.149.1621271875546; Mon, 17 May 2021 10:17:55 -0700 (PDT) MIME-Version: 1.0 References: <20210517112044.233138-1-aisheng.dong@nxp.com> <20210517112044.233138-2-aisheng.dong@nxp.com> In-Reply-To: <20210517112044.233138-2-aisheng.dong@nxp.com> From: Yu Zhao Date: Mon, 17 May 2021 11:17:43 -0600 Message-ID: Subject: Re: [PATCH 1/5] mm: correct SECTION_SHIFT name in code comments To: Dong Aisheng Cc: Linux-MM , linux-kernel , dongas86@gmail.com, Andrew Morton , Andrey Konovalov , Catalin Marinas , Kees Cook Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: A77D6E00010F Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=wJ7BKxpI; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf21.hostedemail.com: domain of yuzhao@google.com designates 209.85.128.51 as permitted sender) smtp.mailfrom=yuzhao@google.com X-Rspamd-Server: rspam03 X-Stat-Signature: ru43d6my65xshy4n9majhrh7kwjwcqbe X-HE-Tag: 1621271876-983580 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 Mon, May 17, 2021 at 5:21 AM Dong Aisheng wrote: > > Actually SECTIONS_SHIFT is used in the kernel code, fixed the code > comments. BTW, also moved the code comment to where it's defined. > > Also fixed a checkpatch complain derived from the original code: > WARNING: please, no space before tabs > + * SECTIONS_SHIFT ^I^I#bits space required to store a section #$ > > Cc: Andrew Morton > Cc: Yu Zhao > Cc: Andrey Konovalov > Cc: Catalin Marinas > Cc: Kees Cook > Signed-off-by: Dong Aisheng > --- > include/linux/mmzone.h | 2 -- > include/linux/page-flags-layout.h | 3 +++ > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > index 9cdc88d09f2b..fc23e36cb165 100644 > --- a/include/linux/mmzone.h > +++ b/include/linux/mmzone.h > @@ -1198,8 +1198,6 @@ static inline struct zoneref *first_zones_zonelist(struct zonelist *zonelist, > #ifdef CONFIG_SPARSEMEM > > /* > - * SECTION_SHIFT #bits space required to store a section # > - * > * PA_SECTION_SHIFT physical address to/from section number > * PFN_SECTION_SHIFT pfn to/from section number > */ > diff --git a/include/linux/page-flags-layout.h b/include/linux/page-flags-layout.h > index ef1e3e736e14..aff616855492 100644 > --- a/include/linux/page-flags-layout.h > +++ b/include/linux/page-flags-layout.h > @@ -26,6 +26,9 @@ > > #define ZONES_WIDTH ZONES_SHIFT > > +/* > + * SECTIONS_SHIFT #bits space required to store a section # > + */ IMO, we should either make the original comment helpful or just remove it. Moving it here doesn't improve readability because it's stating the obvious. > #ifdef CONFIG_SPARSEMEM > #include > #define SECTIONS_SHIFT (MAX_PHYSMEM_BITS - SECTION_SIZE_BITS) > -- > 2.25.1 >