From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751490AbdAMLXn (ORCPT ); Fri, 13 Jan 2017 06:23:43 -0500 Received: from foss.arm.com ([217.140.101.70]:40184 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751419AbdAMLXm (ORCPT ); Fri, 13 Jan 2017 06:23:42 -0500 Date: Fri, 13 Jan 2017 11:22:05 +0000 From: Mark Rutland To: miles.chen@mediatek.com Cc: catalin.marinas@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, wsd_upstream@mediatek.com Subject: Re: [PATCH] arm64/mm: use phys_addr_t Message-ID: <20170113112205.GA26804@leverpostej> References: <1484287175-14342-1-git-send-email-miles.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1484287175-14342-1-git-send-email-miles.chen@mediatek.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 13, 2017 at 01:59:35PM +0800, miles.chen@mediatek.com wrote: > From: Miles Chen > > Use phys_addr_t instead of unsigned long for the > return value of __pa(), make code easy to understand. > > Signed-off-by: Miles Chen This looks sensible to me. It's consistent with the types these variables are compared against, and with the types of function parameters these are passed as. Acked-by: Mark Rutland Thanks, Mark. > --- > arch/arm64/mm/mmu.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c > index 17243e4..7eb7c21 100644 > --- a/arch/arm64/mm/mmu.c > +++ b/arch/arm64/mm/mmu.c > @@ -359,8 +359,8 @@ static void create_mapping_late(phys_addr_t phys, unsigned long virt, > > static void __init __map_memblock(pgd_t *pgd, phys_addr_t start, phys_addr_t end) > { > - unsigned long kernel_start = __pa(_text); > - unsigned long kernel_end = __pa(__init_begin); > + phys_addr_t kernel_start = __pa(_text); > + phys_addr_t kernel_end = __pa(__init_begin); > > /* > * Take care not to create a writable alias for the > -- > 1.9.1 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel