cmd_sf: include header file common.h before div64.h
PATCH 1/1 cmd_sf: include header file common.h before div64.h
The header file div64.h includes <asm/types.h> which defines the phys_addr_t according to the macro CONFIG_PHYS_64BIT, while the macro CONFIG_PHYS_64BIT is included in common.h which comes after div64.h, so in order to get consistent type definition for phys_addr_t, common.h should be included before div64.h, Or else, the parameters of phys_addr_t type will be passed wrongly when CONFIG_PHYS_64BIT is defined.
---
Based on master branch of git://git.denx.de/u-boot.git
Also can apply direcly to git://www.denx.de/git/u-boot-mpc85xx.git
Tested on P2041RDB board.
common/cmd_sf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
common/cmd_sf.c +1 -1
@@ -5,8 +5,8 @@* Licensed under the GPL-2 or later. */ -#include <div64.h> #include <common.h> +#include <div64.h> #include <malloc.h> #include <spi_flash.h>
Signature · 1 line
1.7.5.1
Quoted 9 lines · Mingkai Hu
The header file
div64.hincludes <asm/types.h> which defines thephys_addr_taccording to the macroCONFIG_PHYS_64BIT, while the macroCONFIG_PHYS_64BITis included incommon.hwhich comes afterdiv64.h, so in order to get consistent type definition forphys_addr_t,common.hshould be included beforediv64.h, Or else, the parameters ofphys_addr_ttype will be passed wrongly whenCONFIG_PHYS_64BITis defined.Signed-off-by Mingkai Hu <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130408/9472fbf6/attachment.pgp>