Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753790Ab3EHT3h (ORCPT ); Wed, 8 May 2013 15:29:37 -0400 Received: from mail-la0-f50.google.com ([209.85.215.50]:58569 "EHLO mail-la0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751520Ab3EHT3f (ORCPT ); Wed, 8 May 2013 15:29:35 -0400 Message-ID: <518AA7A0.1020702@cogentembedded.com> Date: Wed, 08 May 2013 23:29:36 +0400 From: Sergei Shtylyov Organization: Cogent Embedded User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: Jiang Liu CC: Andrew Morton , Jiang Liu , David Rientjes , Wen Congyang , Mel Gorman , Minchan Kim , KAMEZAWA Hiroyuki , Michal Hocko , James Bottomley , David Howells , Mark Salter , Jianguo Wu , linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Yoshinori Sato , Geert Uytterhoeven Subject: Re: [PATCH v5, part4 20/41] mm/h8300: prepare for removing num_physpages and simplify mem_init() References: <1368028298-7401-1-git-send-email-jiang.liu@huawei.com> <1368028298-7401-21-git-send-email-jiang.liu@huawei.com> <518A7CC0.1010606@cogentembedded.com> In-Reply-To: <518A7CC0.1010606@cogentembedded.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1957 Lines: 57 Hello. On 05/08/2013 08:26 PM, Sergei Shtylyov wrote: > >> Prepare for removing num_physpages and simplify mem_init(). > >> Signed-off-by: Jiang Liu >> Cc: Yoshinori Sato >> Cc: Geert Uytterhoeven >> Cc: linux-kernel@vger.kernel.org >> --- >> arch/h8300/mm/init.c | 34 ++++++++-------------------------- >> 1 file changed, 8 insertions(+), 26 deletions(-) > >> diff --git a/arch/h8300/mm/init.c b/arch/h8300/mm/init.c >> index 22fd869..0088f3a 100644 >> --- a/arch/h8300/mm/init.c >> +++ b/arch/h8300/mm/init.c >> @@ -121,40 +121,22 @@ void __init paging_init(void) >> >> void __init mem_init(void) >> { >> - int codek = 0, datak = 0, initk = 0; >> - /* DAVIDM look at setup memory map generically with reserved >> area */ >> - unsigned long tmp; >> - extern unsigned long _ramend, _ramstart; >> - unsigned long len = &_ramend - &_ramstart; >> - unsigned long start_mem = memory_start; /* DAVIDM - these must >> start at end of kernel */ >> - unsigned long end_mem = memory_end; /* DAVIDM - this must not >> include kernel stack at top */ >> + unsigned long codesize = _etext - _stext; >> >> #ifdef DEBUG >> - printk(KERN_DEBUG "Mem_init: start=%lx, end=%lx\n", start_mem, >> end_mem); >> + pr_debug("Mem_init: start=%lx, end=%lx\n", memory_start, >> memory_end); >> #endif > > pr_debug() only prints something if DEBUG is #define'd, so you can > drop the #ifdef here. Although, not necessarily: it also supports CONFIG_DYNAMIC_DEBUG -- look at how pr_debug() is defined. So this doesn't seem to be an equivalent change, and I suggest not doing it at all. WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/