This is an automated email from Gerrit.

"Tomas Vanek <van...@fbl.cz>" just uploaded a new patch set to Gerrit, which 
you can find at https://review.openocd.org/c/openocd/+/8426

-- gerrit

commit 97c83779c8239c08e7079ef8a12bfedb4435323b
Author: Tomas Vanek <van...@fbl.cz>
Date:   Fri Aug 2 19:45:09 2024 +0200

    tcl/interface/raspberrypi5-gpiod: fix string match pattern escaping
    
    Use correct TCL syntax and save string map operation.
    
    Change-Id: Ic2a522bd57cf6610b7df1d9cddd0fbdc2076ed62
    Signed-off-by: Tomas Vanek <van...@fbl.cz>

diff --git a/tcl/interface/raspberrypi5-gpiod.cfg 
b/tcl/interface/raspberrypi5-gpiod.cfg
index f3fdde0f20..9624ad5114 100644
--- a/tcl/interface/raspberrypi5-gpiod.cfg
+++ b/tcl/interface/raspberrypi5-gpiod.cfg
@@ -19,8 +19,7 @@ proc read_file { name } {
 }
 
 set pcie_aspm [read_file /sys/module/pcie_aspm/parameters/policy]
-# escaping [ ] characters in string match pattern does not work in Jim-Tcl
-if {![string match "*<performance>*" [string map { "\[" < "\]" > } 
$pcie_aspm]]} {
+if {![string match {*\[performance\]*} $pcie_aspm]} {
        echo "Warn : Switch PCIe power saving off or the first couple of pulses 
gets clocked as fast as 20 MHz"
        echo "Warn : Issue 'echo performance | sudo tee 
/sys/module/pcie_aspm/parameters/policy'"
 }

-- 

Reply via email to