Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1575296ybg; Wed, 29 Jul 2020 18:53:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmKf3HmncXwYfIjn8OEjc4mkQyuN4b5YBJN0vLYf4p5f3drxoNT8GAaT1QFZfpg03H/SZ4 X-Received: by 2002:a05:6402:c85:: with SMTP id cm5mr564334edb.350.1596073993334; Wed, 29 Jul 2020 18:53:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596073993; cv=none; d=google.com; s=arc-20160816; b=CEwz0oBY+7N7zUyOHM9jyE9VThR5c7pMOubfM+Ne9dE91ksnJZ8w8hDQlsAD4q6ptm H1MdzlnSpXQFMikVQXgZ8JX/HDhSPGFIj3/+PZbeMjaKJ1RIsUkBT/BjXCvON7D2a6WR XNLUdSSGXXYu3ScEE1zZaFiHI4FA6D5QytyqgfykK3b2WvA8fpsF70VdLhlb8mJp3fJd JuDN0g4zHRrw/lWCqbB4qtW/yjTXyMHJv+nrY5xE48glzYvjpyn6OwblKwJZVXW7nN8Q 7ixVB/XBOFVcT3ULAke1ClpAvrW4c43ACDvignKtRR+b8luWAuCokmIsNcuw6LSNZIpo 9aLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Wr/vxuRMCyMaqxtO9q8uf3t1cVc0k0F6Dgt7vG6jHBM=; b=BtOPst9RKdiwN9DX4GVNqTZDYZM4GliE78mN1vzFHLAauZyH5mVdJj9P9wYSjnkK2A FTgaZr7XoGrmtkJCHxD/Tu7HOqputRS9AMNYfGaGbtKs6HcJ+TFRswXhROGB6opkm/xk DoqTtqPyyxeBLAq5LsYWdBFeiWl2xO3ihRyJTQ6WnJOQmJFWUI/wkv5mwA+2UqsfbI/T kRr0Mm6zAKQXysFEtVmyyrIUNsI0sYIGYlq3USu24Eua4nxrpdDyRqJsD8PfhN+fpnye zDo9trqS6QJQGHxHgnHsr3hAUApp08SeibxjPH+qtCygZywqJI91XATnBt/+HjP3DMzX gFKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aBhw3tWR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f12si2226512ejf.82.2020.07.29.18.52.51; Wed, 29 Jul 2020 18:53:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aBhw3tWR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728324AbgG3Bwl (ORCPT + 99 others); Wed, 29 Jul 2020 21:52:41 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:25311 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728306AbgG3Bwk (ORCPT ); Wed, 29 Jul 2020 21:52:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596073959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Wr/vxuRMCyMaqxtO9q8uf3t1cVc0k0F6Dgt7vG6jHBM=; b=aBhw3tWRZefQIBzuMK7MB9IbwUcjun42aeewRNDlN5wALbcL3JvpIO1/mxkYwjY3G1PBcE d7lQGs4tJRovG22Fboyc9wGygmn0NnReZss0iDjt1lfiqZ77cuU1EJbsQGqI/y5pprn4Zu bGVgBk5QdtElrbllzKMuUU6A/wp7Q1w= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-146-29YBKjvJP4OrLqv9mdWq_A-1; Wed, 29 Jul 2020 21:52:35 -0400 X-MC-Unique: 29YBKjvJP4OrLqv9mdWq_A-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A1F7459; Thu, 30 Jul 2020 01:52:29 +0000 (UTC) Received: from localhost (ovpn-12-125.pek2.redhat.com [10.72.12.125]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4E3136179C; Thu, 30 Jul 2020 01:52:27 +0000 (UTC) Date: Thu, 30 Jul 2020 09:52:21 +0800 From: Baoquan He To: Mike Rapoport Cc: Andrew Morton , Andy Lutomirski , Benjamin Herrenschmidt , Borislav Petkov , Catalin Marinas , Christoph Hellwig , Dave Hansen , Ingo Molnar , Marek Szyprowski , Max Filippov , Michael Ellerman , Michal Simek , Mike Rapoport , Palmer Dabbelt , Paul Mackerras , Paul Walmsley , Peter Zijlstra , Russell King , Stafford Horne , Thomas Gleixner , Will Deacon , Yoshinori Sato , clang-built-linux@googlegroups.com, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, x86@kernel.org Subject: Re: [PATCH 09/15] memblock: make for_each_memblock_type() iterator private Message-ID: <20200730015221.GI14854@MiWiFi-R3L-srv> References: <20200728051153.1590-1-rppt@kernel.org> <20200728051153.1590-10-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200728051153.1590-10-rppt@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/28/20 at 08:11am, Mike Rapoport wrote: > From: Mike Rapoport > > for_each_memblock_type() is not used outside mm/memblock.c, move it there > from include/linux/memblock.h > > --- > include/linux/memblock.h | 5 ----- > mm/memblock.c | 5 +++++ > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/include/linux/memblock.h b/include/linux/memblock.h > index 017fae833d4a..220b5f0dad42 100644 > --- a/include/linux/memblock.h > +++ b/include/linux/memblock.h > @@ -532,11 +532,6 @@ static inline unsigned long memblock_region_reserved_end_pfn(const struct memblo > region < (memblock.memblock_type.regions + memblock.memblock_type.cnt); \ > region++) > > -#define for_each_memblock_type(i, memblock_type, rgn) \ > - for (i = 0, rgn = &memblock_type->regions[0]; \ > - i < memblock_type->cnt; \ > - i++, rgn = &memblock_type->regions[i]) > - > extern void *alloc_large_system_hash(const char *tablename, > unsigned long bucketsize, > unsigned long numentries, > diff --git a/mm/memblock.c b/mm/memblock.c > index 39aceafc57f6..a5b9b3df81fc 100644 > --- a/mm/memblock.c > +++ b/mm/memblock.c > @@ -129,6 +129,11 @@ struct memblock memblock __initdata_memblock = { > .current_limit = MEMBLOCK_ALLOC_ANYWHERE, > }; > > +#define for_each_memblock_type(i, memblock_type, rgn) \ > + for (i = 0, rgn = &memblock_type->regions[0]; \ > + i < memblock_type->cnt; \ > + i++, rgn = &memblock_type->regions[i]) > + Reviewed-by: Baoquan He