From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chin Liang See Date: Wed, 7 Sep 2016 21:31:02 +0800 Subject: [U-Boot] [PATCH 07/11] arm: socfpga: sysmgr: Fix casting warning when enabling ARM64 In-Reply-To: <5de2c19b-2b17-5780-1b23-80b09f4665ec@denx.de> References: <1471878163-3598-1-git-send-email-clsee@altera.com> <1471878163-3598-8-git-send-email-clsee@altera.com> <24fff019-151f-002c-3a07-a7d612f38562@denx.de> <1473154916.4366.24.camel@altera.com> <5de2c19b-2b17-5780-1b23-80b09f4665ec@denx.de> Message-ID: <1473255062.6330.5.camel@altera.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, 2016-09-06 at 14:12 +0200, Marek Vasut wrote: > On 09/06/2016 11:41 AM, Chin Liang See wrote: > > On Mon, 2016-09-05 at 18:02 +0200, Marek Vasut wrote: > > > On 08/22/2016 05:02 PM, Chin Liang See wrote: > > > > Fix casting warning to pointer from integer of different size > > > > when enabling ARM64 support > > > > > > What sort of error did you observe ? > > > > The warning is triggered as ARM64 has build flag -Wpointer-to-int > > -cast > > and similar. Here is the build error log > > > > arch/arm/mach-socfpga/system_manager.c: In function > > sysmgr_pinmux_init: > > > > > > arch/arm/mach-socfpga/system_manager.c:59:18: warning: > > cast > > from pointer to integer of different size [-Wpointer-to-int-cast] > > > > uint32_t regs = (uint32_t)&sysmgr_regs > > ->emacio[0]; > > > > ^ > > > > > > > > In file > > included from arch/arm/mach-socfpga/system_manager.c:8:0: > > > > > > > > ./arch/arm/include/asm/io.h:78:29: warning: cast to pointer > > from > > integer of different size [-Wint-to-pointer-cast] > > > > #define __arch_putl(v,a) (*(volatile unsigned > > int > > *)(a) = (v)) > > > > I see ... Except the code below does regs += sizeof(regs); , which in > the original case increments the address by 4 , but with your change, > the increment would be 16 . So this patch breaks things. > Relook back, this portion is not being used and hence not being validated. Will put #ifdef in place to skip out these code. Thanks Chin Liang > btw it's not worth reposting patches while there is still ongoing > discussion. >