diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2022-03-01 23:21:20 +0100 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2022-03-12 09:43:00 +0000 |
commit | 9a6417e03595e1194f125ca33d2b60b8eac9a512 (patch) | |
tree | a1f1d0df8d04859fe596a079d58659f511e49adb | |
parent | 5ffc397278b877000f88dbe0f750b0a1611338a4 (diff) | |
download | riscv-openocd-9a6417e03595e1194f125ca33d2b60b8eac9a512.zip riscv-openocd-9a6417e03595e1194f125ca33d2b60b8eac9a512.tar.gz riscv-openocd-9a6417e03595e1194f125ca33d2b60b8eac9a512.tar.bz2 |
tcl: don't use 'set' to retrieve the value of a variable
Original TLC syntax uses 'set varname' to retrieve the value of
variable 'varname'. Such archaic syntax is still valid, but the
shorter '$varname' makes the code easier to read.
Replace 'set varname' with '$varname'.
While there, remove some useless curly brackets.
Change-Id: I27310e8c05afe56ea8bd0e41d4ae2c34447b725c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6863
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
-rw-r--r-- | tcl/board/lemaker_hikey.cfg | 2 | ||||
-rw-r--r-- | tcl/board/tocoding_poplar.cfg | 2 | ||||
-rw-r--r-- | tcl/target/bluefield.cfg | 2 | ||||
-rw-r--r-- | tcl/target/xilinx_zynqmp.cfg | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/tcl/board/lemaker_hikey.cfg b/tcl/board/lemaker_hikey.cfg index ee677c3..325b6fd 100644 --- a/tcl/board/lemaker_hikey.cfg +++ b/tcl/board/lemaker_hikey.cfg @@ -17,7 +17,7 @@ proc core_up { args } { global _TARGETNAME # examine remaining cores - foreach _core [set args] { + foreach _core $args { ${_TARGETNAME}$_core arp_examine } } diff --git a/tcl/board/tocoding_poplar.cfg b/tcl/board/tocoding_poplar.cfg index 6d2e635..36d5aec 100644 --- a/tcl/board/tocoding_poplar.cfg +++ b/tcl/board/tocoding_poplar.cfg @@ -19,7 +19,7 @@ proc core_up { args } { global _TARGETNAME # examine remaining cores - foreach _core [set args] { + foreach _core $args { ${_TARGETNAME}$_core arp_examine } } diff --git a/tcl/target/bluefield.cfg b/tcl/target/bluefield.cfg index 62b1e31..dcebb2f 100644 --- a/tcl/target/bluefield.cfg +++ b/tcl/target/bluefield.cfg @@ -72,7 +72,7 @@ proc core_up { args } { global _TARGETNAME # Examine remaining cores - foreach _core [set args] { + foreach _core $args { ${_TARGETNAME}$_core arp_examine } } diff --git a/tcl/target/xilinx_zynqmp.cfg b/tcl/target/xilinx_zynqmp.cfg index e66289a..2df7a4f 100644 --- a/tcl/target/xilinx_zynqmp.cfg +++ b/tcl/target/xilinx_zynqmp.cfg @@ -99,7 +99,7 @@ targets $_TARGETNAME.0 proc core_up { args } { global _TARGETNAME - foreach { core } [set args] { + foreach core $args { $_TARGETNAME.$core arp_examine } } |