From: Wolfgang Denk Date: Sat, 23 Oct 2010 21:27:41 +0200 Subject: [U-Boot] [PATCH 4/5] cfi_flash: handle 'chip size exceeds address window' situation In-Reply-To: <201010221239.36387.sr@denx.de> References: <1287674413-3900-1-git-send-email-yanok@emcraft.com> <1287674413-3900-5-git-send-email-yanok@emcraft.com> <201010221239.36387.sr@denx.de> Message-ID: <20101023192741.1E131136320@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Stefan Roese, In message <201010221239.36387.sr@denx.de> you wrote: > > > +static phys_addr_t __cfi_flash_bank_size(int i) > > +{ > > +#ifdef CONFIG_SYS_FLASH_BANKS_SIZES > > + return ((unsigned long [])CONFIG_SYS_FLASH_BANKS_SIZES)[i]; > > +#else > > + return 0; > > +#endif > > +} > > +phys_addr_t cfi_flash_bank_size(int i) > > + __attribute__((weak, alias("__cfi_flash_bank_size"))); > > Please use a consistent type here (phys_addr_t vs. unsigned long). unsigned > long seems to be the correct one looking at the caller function. Well, phys_addr_t would be a more appropriate type for all these arguments, but that would be a bigger change (and as such out of the scope of this patch), so we should use unsigned long here. > Otherwise: > > Acked-by: Stefan Roese > > Wolfgang, feel free to pull this directly if you like. Will do, thanks. Ilya, I will make the phys_addr_t => unsigned long change when applying; no need to resubmit. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "The number of Unix installations has grown to 10, with more expected." - The Unix Programmer's Manual, 2nd Edition, June, 1972