[U-Boot] [PATCH 4/5] cfi_flash: handle 'chip size exceeds address window' situation

Wolfgang Denk wd at denx.de
Sat Oct 23 21:27:41 CEST 2010


Dear Stefan Roese,

In message <201010221239.36387.sr at 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 <sr at denx.de>
> 
> 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


More information about the U-Boot mailing list