[U-Boot] [PATCH] common: Remove invalid endianess conversion

Christian Eggers ceggers at gmx.de
Wed Feb 5 21:44:06 CET 2014


do_bootm_standanlone() calls ntohl(images->ep) which is obviously wrong
(find . -name '*.c' | xargs grep -n -- 'images->ep'). Without this
conversion the code works correctly at least on ARM9. Addtionally "appl"
must not be dereferenced with the "*" operator.

Signed-off-by: Christian Eggers <ceggers at gmx.de>
---
 common/cmd_bootm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index a59ee95..c507e1d 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -514,8 +514,8 @@ static int do_bootm_standalone(int flag, int argc, char * const argv[],
 		setenv_hex("filesize", images->os.image_len);
 		return 0;
 	}
-	appl = (int (*)(int, char * const []))(ulong)ntohl(images->ep);
-	(*appl)(argc, argv);
+	appl = (int (*)(int, char * const []))images->ep;
+	(appl)(argc, argv);
 	return 0;
 }
 
-- 
1.8.4.5



More information about the U-Boot mailing list