diff options
author | Tom Hughes <tomhughes@chromium.org> | 2022-08-26 10:31:10 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-08-27 00:05:21 +0000 |
commit | 76099d7ba8f4df0722dcd8ef074bbf14f08fe155 (patch) | |
tree | 1847b386617539a1d4d04fe307f9aa7e9ebcf4ca /util | |
parent | f6e5b226b878001a3aa81d9c5d0057d0fd321b09 (diff) | |
download | chrome-ec-76099d7ba8f4df0722dcd8ef074bbf14f08fe155.tar.gz |
util/flash_ec: Fix shellcheck warnings
PATCH_SIZE=$((${SPI_SIZE} - ${IMG_SIZE}))
^---------^ SC2004: $/${} is unnecessary on arithmetic variables.
^---------^ SC2004: $/${} is unnecessary on
arithmetic variables.
let LOOP_COUNTER=LOOP_COUNTER-1
^-----------------------------^ SC2219: Instead of 'let expr', prefer
(( expr )) .
BRANCH=none
BUG=b:242127759
TEST=./util/flash_ec --board=dartmonkey
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I5f167427a4dad2ed8986e0b196042ba8d950eddb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3860069
Reviewed-by: Andrea Grandi <agrandi@google.com>
Diffstat (limited to 'util')
-rwxr-xr-x | util/flash_ec | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/flash_ec b/util/flash_ec index e8a1f37b2e..ad306187fd 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -911,7 +911,7 @@ repo sync && sudo emerge hdctools servo-firmware && sudo servo_updater -b c2d2" while [[ "$(dut_control_get h1_vref_present)" = "off" \ && "${LOOP_COUNTER}" -gt 1 ]] ; do sleep 0.1 - let LOOP_COUNTER=LOOP_COUNTER-1 + (( LOOP_COUNTER=LOOP_COUNTER-1 )) done # If we ran out of time, then just die now if [[ "${LOOP_COUNTER}" -eq 1 ]] ; then @@ -1060,7 +1060,7 @@ function flash_flashrom() { tail -n1) || die "Failed to determine chip size!" [[ ${SPI_SIZE} -eq 0 ]] && die "Chip size is 0!" - PATCH_SIZE=$((${SPI_SIZE} - ${IMG_SIZE})) + PATCH_SIZE=$(( SPI_SIZE - IMG_SIZE )) # Temp image T=/tmp/flash_spi_$$ |