[PATCH 07/10] Documentation: zii: Fix buggy check_bits_set_32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix a buggy while loop expression, that, due to '==' operator's
precedence (higher than that of '&') was always evaluating to false
rendering busy loop into a no-op.

Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 Documentation/boards/imx/zii-imx7d-rpu2/openocd.cfg | 2 +-
 Documentation/boards/imx/zii-vf610-dev/openocd.cfg  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/boards/imx/zii-imx7d-rpu2/openocd.cfg b/Documentation/boards/imx/zii-imx7d-rpu2/openocd.cfg
index 675832b7c..33e3bce9d 100644
--- a/Documentation/boards/imx/zii-imx7d-rpu2/openocd.cfg
+++ b/Documentation/boards/imx/zii-imx7d-rpu2/openocd.cfg
@@ -32,7 +32,7 @@ proc disable_wdog { } {
 set ddr_init_failed 0
 
 proc check_bits_set_32 { addr mask } {
-    while { [expr [mrw $addr] & $mask == 0] } { }
+    while { [expr [mrw $addr] & $mask] == 0 } { }
 }
 
 proc ddr_init { } {
diff --git a/Documentation/boards/imx/zii-vf610-dev/openocd.cfg b/Documentation/boards/imx/zii-vf610-dev/openocd.cfg
index 611687d27..222f48711 100644
--- a/Documentation/boards/imx/zii-vf610-dev/openocd.cfg
+++ b/Documentation/boards/imx/zii-vf610-dev/openocd.cfg
@@ -28,7 +28,7 @@ source [find mem_helper.tcl]
 set ddr_init_failed 0
 
 proc check_bits_set_32 { addr mask } {
-    while { [expr [mrw $addr] & $mask == 0] } { }
+    while { [expr [mrw $addr] & $mask] == 0 } { }
 }
 
 proc ddr_init { } {
-- 
2.21.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux