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=-20.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,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 BA79AC47082 for ; Mon, 31 May 2021 18:09:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3897F6124B for ; Mon, 31 May 2021 18:09:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3897F6124B 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 616786B006C; Mon, 31 May 2021 14:09:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5C6A08D0003; Mon, 31 May 2021 14:09:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4676D8D0002; Mon, 31 May 2021 14:09:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0216.hostedemail.com [216.40.44.216]) by kanga.kvack.org (Postfix) with ESMTP id 0FA7C6B006C for ; Mon, 31 May 2021 14:09:02 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 8E452180AD807 for ; Mon, 31 May 2021 18:09:01 +0000 (UTC) X-FDA: 78202312482.01.636910E Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by imf23.hostedemail.com (Postfix) with ESMTP id 30D43A000241 for ; Mon, 31 May 2021 18:08:51 +0000 (UTC) Received: by mail-wr1-f48.google.com with SMTP id z17so11724968wrq.7 for ; Mon, 31 May 2021 11:09:01 -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=J9CeG0mQZWqNSgpi5Ck6H+BuPM/wRmrM/1NtTFe6Wqo=; b=uzKJac3BYoSbunLrcNacLppqYguIrKE+/h0HAmYxFwYF2j85vNsyJptGyEDgka87i6 go+rcljzoEwCEM4jyulrIqfSNEGa4iTaypUPoTcyJ0YIkBJ4SLzNEXwjAkvMHX/Dc85s nUAulm3vrYs1AgBOTx5B0+sZq4EDqTS779CrAVQCe9aQ8cdg86MWDqqCpnrArnn/Xufp Nyj3go/0ywI6LKRjCyjvX7LCxLibtVlNdGsEXxzFuhCdIouBs4y1CE+GtquJAggJnrdH LkjcK2rP5w2gcHdPbZAj0CSyf70HB8GfzX4b32BoC5pBtbuhi/EJ9uGqsEvfzrVK0Cy0 5pKQ== 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=J9CeG0mQZWqNSgpi5Ck6H+BuPM/wRmrM/1NtTFe6Wqo=; b=Udfnsy43shRyoq67u+y5oRRjnqRAtG8mUyW4vE5knMnSZcBRmFvnY+gh9KDxa2M4wL yQgWOWSnAcPvmFi42AHZUV2hvz39MpGh9NW2EQCXD6VFpNQWFmzHWpVeER5yc02R229n eQl4TWK6M3iXSO7Lh8x1iBawepds81nmn7uxLTAD0V8o+M4ldvAoLI8hqAKsOpXMYne4 H6WA1IsS00LNuEsL9yn8wzSpvlm3C4pjcjbOS6hm90WsLsoS7A32LNt2nLzb5Fm/jecF ffPTSjiYzqF3zbgV0mt6PI/0BeY3880AOLKa34CAhWGP3dV3vJoiEEUTxh9fnCi9Hiwu iD8Q== X-Gm-Message-State: AOAM533ym1BxoW4d+T4iRCVqgT/8d61skLqmou63mE84mL3XIEw7eGXH YIube/082wfH8Vq79dDQvQGTg+PZJRFSPAiGcCGpBA== X-Google-Smtp-Source: ABdhPJzP2phxAwyycBzGrp6iHULxEPE73xvTZVHS75ciIoV6lgIFZBVlMsY/ekvmR9a1UZuMDXDORJpkO6wAqht84Y0= X-Received: by 2002:adf:f642:: with SMTP id x2mr22929281wrp.323.1622484539776; Mon, 31 May 2021 11:08:59 -0700 (PDT) MIME-Version: 1.0 References: <20210531091908.1738465-1-aisheng.dong@nxp.com> <20210531091908.1738465-2-aisheng.dong@nxp.com> In-Reply-To: <20210531091908.1738465-2-aisheng.dong@nxp.com> From: Yu Zhao Date: Mon, 31 May 2021 12:08:48 -0600 Message-ID: Subject: Re: [PATCH V2 1/6] mm: drop SECTION_SHIFT in code comments To: Dong Aisheng Cc: Linux-MM , linux-kernel , dongas86@gmail.com, Andrew Morton , Andrey Konovalov , Catalin Marinas , Kees Cook Content-Type: multipart/alternative; boundary="000000000000a605c405c3a41e77" X-Rspamd-Queue-Id: 30D43A000241 Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=uzKJac3B; spf=pass (imf23.hostedemail.com: domain of yuzhao@google.com designates 209.85.221.48 as permitted sender) smtp.mailfrom=yuzhao@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam04 X-Stat-Signature: jjcnqkjkat3tuibrdq85z57sm9ezpnsx X-HE-Tag: 1622484531-494096 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: --000000000000a605c405c3a41e77 Content-Type: text/plain; charset="UTF-8" On Mon, May 31, 2021 at 3:20 AM Dong Aisheng wrote: > Actually SECTIONS_SHIFT is used in the kernel code, so the code > comments is strictly incorrect. And since > commit bbeae5b05ef6 ("mm: move page flags layout to separate header"), > SECTIONS_SHIFT definition has been moved to > include/linux/page-flags-layout.h, > since code itself looks quite straighforward, instead of moving > the code comment into the new place as well, we just simply remove it. > > This 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 > Suggested-by: Yu Zhao > Signed-off-by: Dong Aisheng > --- > Changelog: > v1->v2: > * drop the SECTION_SHIFT code comments instead of moving it > Reviewed-by: Yu Zhao > --- > include/linux/mmzone.h | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > index 05cbcddbf432..a6bfde85ddb0 100644 > --- a/include/linux/mmzone.h > +++ b/include/linux/mmzone.h > @@ -1203,8 +1203,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 > */ > -- > 2.25.1 > > --000000000000a605c405c3a41e77 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, May 31, 2021 at 3:20 AM Dong = Aisheng <aisheng.dong@nxp.com> wrote:
Act= ually SECTIONS_SHIFT is used in the kernel code, so the code
comments is strictly incorrect. And since
commit bbeae5b05ef6 ("mm: move page flags layout to separate header&qu= ot;),
SECTIONS_SHIFT definition has been moved to include/linux/page-flags-layout= .h,
since code itself looks quite straighforward, instead of moving
the code comment into the new place as well, we just simply remove it.

This also fixed a checkpatch complain derived from the original code:
WARNING: please, no space before tabs
+ * SECTIONS_SHIFT=C2=A0 =C2=A0 ^I^I#bits space required to store a section= #$

Cc: Andrew Morton <
akpm@linux-foundation.org>
Cc: Yu Zhao <yuzh= ao@google.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Kees Cook <keescook@chromium.org>
Suggested-by: Yu Zhao <yuzhao@google.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
Changelog:
v1->v2:
=C2=A0* drop the SECTION_SHIFT code comments instead of moving it

Reviewed-by:=C2=A0Yu Zhao <yuzhao@google.com>
=C2=A0
---
=C2=A0include/linux/mmzone.h | 2 --
=C2=A01 file changed, 2 deletions(-)

diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 05cbcddbf432..a6bfde85ddb0 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -1203,8 +1203,6 @@ static inline struct zoneref *first_zones_zonelist(st= ruct zonelist *zonelist,
=C2=A0#ifdef CONFIG_SPARSEMEM

=C2=A0/*
- * SECTION_SHIFT=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0#bi= ts space required to store a section #
- *
=C2=A0 * PA_SECTION_SHIFT=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 physical= address to/from section number
=C2=A0 * PFN_SECTION_SHIFT=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pfn to/f= rom section number
=C2=A0 */
--
2.25.1

--000000000000a605c405c3a41e77--