In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 7:
PROC_MASK="$(( (1 << $NPROCS) - 1 ))"
^-----^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 10:
local dev="$1"
^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined.
In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 11:
local match="$(grep -m 1 "$dev\$" /proc/interrupts)"
^---------^ SC3043 (warning): In POSIX sh, 'local' is undefined.
^---^ SC2155 (warning): Declare and assign separately to avoid masking return values.
In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 12:
local cpu=0
^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined.
In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 15:
set -- $match
^----^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
set -- "$match"
In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 17:
for cur in `seq 1 $NPROCS`; do
^-------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
for cur in $(seq 1 "$NPROCS"); do
In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 19:
cpu=$(($cur - 1))
^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 30:
local file="$1"
^--------^ SC3043 (warning): In POSIX sh, 'local' is undefined.
In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 31:
local val="$2"
^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined.
In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 38:
[ -n "$default_ps" -a "$default_ps" != 1 ] && exit 0
^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 40:
exec 512>/var/lock/smp_tune.lock
^-------------------------^ SC3023 (warning): In POSIX sh, FDs outside 0-9 are undefined.
In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 47:
[ -n "$(ls "${dev}/" | grep '^lower_')" ] && continue
^-- SC2143 (style): Use grep -q instead of comparing output with [ -n .. ].
^-- SC2010 (warning): Don't use ls | grep. Use a glob or a for loop with a condition to allow non-alphanumeric filenames.
In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 53:
irq_cpu_mask="$((1 << $irq_cpu))"
^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 55:
for q in ${dev}/queues/rx-*; do
^----^ SC2231 (info): Quote expansions in this for loop glob to prevent wordsplitting, e.g. "$dir"/*.txt .
In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 56:
set_hex_val "$q/rps_cpus" "$(($PROC_MASK & ~$irq_cpu_mask))"
^--------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
^-----------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 59:
ntxq="$(ls -d ${dev}/queues/tx-* | wc -l)"
^--^ SC2034 (warning): ntxq appears unused. Verify use (or export if used externally).
^----------------------^ SC2012 (info): Use find instead of ls to better handle non-alphanumeric filenames.
^----^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
ntxq="$(ls -d "${dev}"/queues/tx-* | wc -l)"
In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 61:
idx=$(($irq_cpu + 1))
^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 62:
for q in ${dev}/queues/tx-*; do
^----^ SC2231 (info): Quote expansions in this for loop glob to prevent wordsplitting, e.g. "$dir"/*.txt .
In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 63:
set_hex_val "$q/xps_cpus" "$((1 << $idx))"
^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/etc/hotplug.d/net/20-smp-tune line 64:
let "idx = idx + 1"
^----------------^ SC3039 (warning): In POSIX sh, 'let' is undefined.
For more information:
https://www.shellcheck.net/wiki/SC2010 -- Don't use ls | grep. Use a glob o...
https://www.shellcheck.net/wiki/SC2034 -- ntxq appears unused. Verify use (...
https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ...