@@ -1079,7 +1079,7 @@ function checkpatch_commit
# FIXME: this relies on local assignment not failing on command
# substitution failures
- local bug_lines=$($cmd | grep -m 1 -B 1 '^\+.*\WBUG' | grep -c '^[+-].*\WBUG')
+ bug_lines=$($cmd | grep -m 1 -B 1 '^\+.*\WBUG' | grep -c '^[+-].*\WBUG')
if test "$bug_lines" -eq 1; then
warn_or_fail "New BUG macro added"
fi
@@ -1087,7 +1087,7 @@ function checkpatch_commit
if [ "$branch" = "drm-intel-next-queued" ]; then
# FIXME: this relies on local assignment not failing on command
# substitution failures
- local non_i915_files=$(git diff-tree --no-commit-id --name-only -r $commit | \
+ non_i915_files=$(git diff-tree --no-commit-id --name-only -r $commit | \
grep -v "^\(drivers/gpu/drm/i915/\|include/drm/i915\|include/uapi/drm/i915\)")
if [ -n "$non_i915_files" ]; then
Fixes shellcheck SC2155: Declare and assign separately to avoid masking return values. Signed-off-by: Jani Nikula <jani.nikula@intel.com> --- dim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)