U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] image-fit: fix fit_image_load() OS check
@ 2016-08-14 18:31 Andreas Bießmann
  2016-08-15  6:41 ` Michal Simek
  2016-09-07 17:57 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Andreas Bießmann @ 2016-08-14 18:31 UTC (permalink / raw)
  To: u-boot

Commit 62afc601883e788f3f22291202d5b2a23c1a8b06 introduced fpga image load via
bootm but broke the OS check in fit_image_load().

This commit removes following compiler warning:

---8<---
In file included from tools/common/image-fit.c:1:
/Volumes/devel/u-boot/tools/../common/image-fit.c:1715:39: warning: use of logical '||' with constant operand [-Wconstant-logical-operand]
        os_ok = image_type == IH_TYPE_FLATDT || IH_TYPE_FPGA ||
                                             ^  ~~~~~~~~~~~~
/Volumes/devel/u-boot/tools/../common/image-fit.c:1715:39: note: use '|' for a bitwise operation
        os_ok = image_type == IH_TYPE_FLATDT || IH_TYPE_FPGA ||
                                             ^~
                                             |
1 warning generated.
--->8---

Signed-off-by: Andreas Bie?mann <andreas@biessmann.org>
Cc: Michal Simek <michal.simek@xilinx.com>
---
 common/image-fit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/image-fit.c b/common/image-fit.c
index d8d4e95..f833fe3 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -1712,7 +1712,8 @@ int fit_image_load(bootm_headers_t *images, ulong addr,
 		  (image_type == IH_TYPE_KERNEL &&
 		   fit_image_check_type(fit, noffset, IH_TYPE_KERNEL_NOLOAD));
 
-	os_ok = image_type == IH_TYPE_FLATDT || IH_TYPE_FPGA ||
+	os_ok = image_type == IH_TYPE_FLATDT ||
+		image_type == IH_TYPE_FPGA ||
 		fit_image_check_os(fit, noffset, IH_OS_LINUX) ||
 		fit_image_check_os(fit, noffset, IH_OS_U_BOOT) ||
 		fit_image_check_os(fit, noffset, IH_OS_OPENRTOS);
-- 
2.7.4 (Apple Git-66)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-07 17:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-14 18:31 [U-Boot] [PATCH] image-fit: fix fit_image_load() OS check Andreas Bießmann
2016-08-15  6:41 ` Michal Simek
2016-08-15  7:30   ` Andreas Bießmann
2016-09-07 17:57 ` [U-Boot] " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox