From patchwork Tue Mar 22 21:43:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12789132 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 3F57FC433EF for ; Tue, 22 Mar 2022 21:43:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D09AF6B00DC; Tue, 22 Mar 2022 17:43:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C63D46B00DD; Tue, 22 Mar 2022 17:43:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B2C016B00DE; Tue, 22 Mar 2022 17:43:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 9C6196B00DC for ; Tue, 22 Mar 2022 17:43:15 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 757B824409 for ; Tue, 22 Mar 2022 21:43:15 +0000 (UTC) X-FDA: 79273348350.09.9098ACB Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf23.hostedemail.com (Postfix) with ESMTP id EEE05140036 for ; Tue, 22 Mar 2022 21:43:14 +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 ams.source.kernel.org (Postfix) with ESMTPS id B3E50B81DB3; Tue, 22 Mar 2022 21:43:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4278BC340EE; Tue, 22 Mar 2022 21:43:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1647985392; bh=bpaFSIc7ZBNjCH63R/S83QHOpSD0M8MAHs9Hh9FydY8=; h=Date:To:From:In-Reply-To:Subject:From; b=czwKs6ZrU8f66mUM0RC9Uf21mb6DMOUtyliQ71R3KtZk3SL+xLFw2vdDz/2PBkgTl lQc9pFe8103z2nEGWlZqoZv6n9qgSQVYREgKX3G3ziNjI5/noOhfciMWgdQ78B4ciC 0UKz6/6Hwhoax3YjjOQ2Yuqev8wGK3AKOVqN7vR8= Date: Tue, 22 Mar 2022 14:43:11 -0700 To: rppt@linux.ibm.com,david@redhat.com,linmiaohe@huawei.com,akpm@linux-foundation.org,patches@lists.linux.dev,linux-mm@kvack.org,mm-commits@vger.kernel.org,torvalds@linux-foundation.org,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20220322143803.04a5e59a07e48284f196a2f9@linux-foundation.org> Subject: [patch 092/227] mm/mmzone.h: remove unused macros Message-Id: <20220322214312.4278BC340EE@smtp.kernel.org> X-Rspam-User: Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=czwKs6Zr; spf=pass (imf23.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: EEE05140036 X-Stat-Signature: xshcqq5j5wf4n9cpwmihkej1yznoupig X-HE-Tag: 1647985394-264578 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: Miaohe Lin Subject: mm/mmzone.h: remove unused macros Remove pgdat_page_nr, nid_page_nr and NODE_MEM_MAP. They are unused now. Link: https://lkml.kernel.org/r/20220127093210.62293-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: David Hildenbrand Reviewed-by: Mike Rapoport Signed-off-by: Andrew Morton --- include/linux/mmzone.h | 7 ------- 1 file changed, 7 deletions(-) --- a/include/linux/mmzone.h~mm-mmzoneh-remove-unused-macros +++ a/include/linux/mmzone.h @@ -931,12 +931,6 @@ typedef struct pglist_data { #define node_present_pages(nid) (NODE_DATA(nid)->node_present_pages) #define node_spanned_pages(nid) (NODE_DATA(nid)->node_spanned_pages) -#ifdef CONFIG_FLATMEM -#define pgdat_page_nr(pgdat, pagenr) ((pgdat)->node_mem_map + (pagenr)) -#else -#define pgdat_page_nr(pgdat, pagenr) pfn_to_page((pgdat)->node_start_pfn + (pagenr)) -#endif -#define nid_page_nr(nid, pagenr) pgdat_page_nr(NODE_DATA(nid),(pagenr)) #define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn) #define node_end_pfn(nid) pgdat_end_pfn(NODE_DATA(nid)) @@ -1112,7 +1106,6 @@ static inline struct pglist_data *NODE_D { return &contig_page_data; } -#define NODE_MEM_MAP(nid) mem_map #else /* CONFIG_NUMA */