From: Andreas Bießmann Date: Sun, 14 Aug 2016 18:31:24 +0000 (+0200) Subject: image-fit: fix fit_image_load() OS check X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f06ff337acbef7d93937f86c559c7320145a85ae;p=thirdparty%2Fu-boot.git image-fit: fix fit_image_load() OS check 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 Cc: Michal Simek Signed-off-by: Michal Simek --- diff --git a/common/image-fit.c b/common/image-fit.c index 6f920da2204..b5210df12a2 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -1688,7 +1688,8 @@ int fit_image_load(bootm_headers_t *images, ulong addr, 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_OPENRTOS);