Skip to contentSkip to conversation

image-fit: fix fit_image_load() OS check

PATCH In review Andreas Bießmann 3 participants 4 messages Aug 14, 2016 – Sep 7, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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---

---
 common/image-fit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
common/image-fit.c +2 -1
index d8d4e95..f833fe3 100644
@@ -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);
Signature · 1 line
2.7.4 (Apple Git-66)
#1 lore raw

PATCH 1/1 image-fit: fix fit_image_load() OS check

Quoted 29 lines · Andreas Bie?mann

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---

---
 common/image-fit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
common/image-fit.c +0 -0
index d8d4e95..f833fe3 100644

common/image-fit.c int fit_image_load(bootm_headers_t *images, ulong addr, · line 1719

Quoted 9 lines
common/image-fit.c +2 -1
@@ -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);

hm. Interesting. I didn't see that compilation warning.

Thanks,
Michal

#2 lore raw

PATCH 1/1 image-fit: fix fit_image_load() OS check

Hi Michal,

Quoted 36 lines · Michal Simek
Quoted 35 lines · Andreas Bie?mann

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---

---
 common/image-fit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
common/image-fit.c +0 -0
index d8d4e95..f833fe3 100644
@@ -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));
 
Quoted 10 lines
Quoted 7 lines
common/image-fit.c +2 -1
-	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);

hm. Interesting. I didn't see that compilation warning.

It is an llvm 3.6 or so compiler (latest OS X)

Andreas

#3 lore raw
In reply to Andreas Bießmann
Quoted 5 lines · Andreas Bie?mann

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

This commit removes following compiler warning:

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160907/2e160527/attachment.sig>