mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: barebox@lists.infradead.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Subject: [PATCH 07/10] Documentation: zii: Fix buggy check_bits_set_32
Date: Fri, 21 Jun 2019 01:11:13 -0700	[thread overview]
Message-ID: <20190621081116.18335-7-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <20190621081116.18335-1-andrew.smirnov@gmail.com>

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@gmail.com>
---
 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2019-06-21  8:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-21  8:11 [PATCH 01/10] ARM: i.MX: zii-vf610-dev-rev-b: Use SPDX tag in DTS Andrey Smirnov
2019-06-21  8:11 ` [PATCH 02/10] ARM: i.MX: zii-vf610-dev-rev-c: " Andrey Smirnov
2019-06-21  8:11 ` [PATCH 03/10] ARM: i.MX: zii-vf610-dev-rev-b: Fix DTS warning Andrey Smirnov
2019-06-21  8:11 ` [PATCH 04/10] ARM: i.MX: zii-vf610-dev-rev-c: " Andrey Smirnov
2019-06-21  8:11 ` [PATCH 05/10] Documentation: zii-vf610-dev: Add necessary post reset delay Andrey Smirnov
2019-06-21  8:11 ` [PATCH 06/10] Documentation: zii-vf610-dev: Reconcile DDR setup with DCD Andrey Smirnov
2019-06-21  8:11 ` Andrey Smirnov [this message]
2019-06-21  8:11 ` [PATCH 08/10] ARM: Rename zii-imx7d-rpu2 to zii-imx7d-dev Andrey Smirnov
2019-06-21  8:11 ` [PATCH 09/10] ARM: imx7d-zii-rpu2: Switch to using kernel DTS Andrey Smirnov
2019-06-21  8:11 ` [PATCH 10/10] ARM: zii-imx7d-dev: Add support for RMU2 board Andrey Smirnov
2019-06-26  6:57 ` [PATCH 01/10] ARM: i.MX: zii-vf610-dev-rev-b: Use SPDX tag in DTS Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190621081116.18335-7-andrew.smirnov@gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox