Re: [dim PATCH v2 3/7] dim: do not do local variable assignments in declaration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 24 Nov 2016, Jani Nikula <jani.nikula@xxxxxxxxx> wrote:
> @@ -852,18 +876,24 @@ function dim_conf
>  # $1 is the git sha1 to check
>  function checkpatch_commit
>  {
> -	local commit=$1
> -	local cmd="git show --pretty=email $commit"
> +	local commit cmd bug_lines non_i915_files
> +
> +	commit=$1
> +	cmd="git show --pretty=email $commit"
>  
>  	git --no-pager log --oneline -1 $commit
>  	$cmd | scripts/checkpatch.pl -q --emacs --strict - || true
>  
> +	# 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')
>  	if test "$bug_lines" -eq 1; then
>  		warn_or_fail "New BUG macro added"
>  	fi
>  
>          if [ "$branch" = "drm-intel-next-queued" ]; then
> +		# FIXME: this relies on local assignment not failing on command
> +		# substitution failures

v2 here was just a straightforward rebase except for these two fixmes
for when we actually (probably accidentally) rely on this behaviour.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux