From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752227AbbIOXcv (ORCPT ); Tue, 15 Sep 2015 19:32:51 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35351 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751532AbbIOXct (ORCPT ); Tue, 15 Sep 2015 19:32:49 -0400 Date: Tue, 15 Sep 2015 16:32:48 -0700 From: Andrew Morton To: Alexander Kuleshov Cc: Tony Luck , Pekka Enberg , Mel Gorman , Xishi Qiu , Robin Holt , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/5 v2] mm/memblock: Introduce memblock_first_region_size() helper Message-Id: <20150915163248.d7a5e3fdb4e4dfa344731624@linux-foundation.org> In-Reply-To: <1441117631-30589-1-git-send-email-kuleshovmail@gmail.com> References: <1441117527-30466-1-git-send-email-kuleshovmail@gmail.com> <1441117631-30589-1-git-send-email-kuleshovmail@gmail.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 1 Sep 2015 20:27:11 +0600 Alexander Kuleshov wrote: > Some architectures (like s390, microblaze and etc...) require size > of the first memory region. This patch provides new memblock_first_region_size() > helper for this case. > > ... > > +phys_addr_t __init_memblock memblock_first_region_size(void) > +{ > + return memblock.memory.regions[0].size; > +} > + Some callers call this from __init code, which is OK. Other callers call it from an inlined function and I'm too lazy to work out if all the callers of those callers are calling memblock_first_region_size() from a compatible section. So please either a) demonstrate that all the sectioning is correct (and maintainable!) or b) simply inline memblock_first_region_size()...