Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751858AbbHMAZU (ORCPT ); Wed, 12 Aug 2015 20:25:20 -0400 Received: from icp-osb-irony-out3.external.iinet.net.au ([203.59.1.153]:26029 "EHLO icp-osb-irony-out3.external.iinet.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751169AbbHMAZS (ORCPT ); Wed, 12 Aug 2015 20:25:18 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqwBAArjy1VnMNI1/2dsb2JhbAANUIRYqh4BAQEBAQEGm0ACggwBAQEBAQGFLwEBBHgBEAsNCwkWDwkDAgECAQ82BgEMAQUCAQGIFQO5RZFODYVTAQEBAQEBAQEBAQEBAQEBAQEBGoYghTOCT4I6B4QsAQSVE4p+AYprhVyEBIczgjQcgWVfgkwBAQE X-IronPort-AV: E=Sophos;i="5.15,665,1432569600"; d="scan'208";a="115248986" Message-ID: <55CBE47A.5020003@uclinux.org> Date: Thu, 13 Aug 2015 10:27:38 +1000 From: Greg Ungerer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Alexander Kuleshov , Geert Uytterhoeven CC: linux-m68k@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] m68k/coldfire: use PFN_DOWN macro References: <1439363699-1803-1-git-send-email-kuleshovmail@gmail.com> In-Reply-To: <1439363699-1803-1-git-send-email-kuleshovmail@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1683 Lines: 54 Hi Alexander, On 12/08/15 17:14, Alexander Kuleshov wrote: > Replace ((x) >> PAGE_SHIFT) with the predefined PFN_DOWN macro. > > Signed-off-by: Alexander Kuleshov This one looks good. Applied to m68knommu git tree (for-next branch). Thanks Greg > --- > arch/m68k/coldfire/m54xx.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/arch/m68k/coldfire/m54xx.c b/arch/m68k/coldfire/m54xx.c > index 075aaab..f7836c6 100644 > --- a/arch/m68k/coldfire/m54xx.c > +++ b/arch/m68k/coldfire/m54xx.c > @@ -25,6 +25,7 @@ > #include > #ifdef CONFIG_MMU > #include > +#include > #endif > > /***************************************************************************/ > @@ -91,13 +92,13 @@ static void __init mcf54xx_bootmem_alloc(void) > m68k_memory[0].size = _ramend - _rambase; > > /* compute total pages in system */ > - num_pages = (_ramend - _rambase) >> PAGE_SHIFT; > + num_pages = PFN_DOWN(_ramend - _rambase); > > /* page numbers */ > memstart = PAGE_ALIGN(_ramstart); > - min_low_pfn = _rambase >> PAGE_SHIFT; > - start_pfn = memstart >> PAGE_SHIFT; > - max_low_pfn = _ramend >> PAGE_SHIFT; > + min_low_pfn = PFN_DOWN(_rambase); > + start_pfn = PFN_DOWN(memstart); > + max_low_pfn = PFN_DOWN(_ramend); > high_memory = (void *)_ramend; > > m68k_virt_to_node_shift = fls(_ramend - _rambase - 1) - 6; > -- 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/