[Intel-gfx] [DIM PATCH 1/3] dim: cleanup checkpatch_commit

Jani Nikula jani.nikula at intel.com
Tue Mar 13 11:30:08 UTC 2018


Remove some old cruft. Pass checkpatch parameters via a variable. No
functional changes.

Cc: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
 dim | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dim b/dim
index 45aec403a44e..81e2bc1511ac 100755
--- a/dim
+++ b/dim
@@ -1360,13 +1360,14 @@ function check_maintainer
 # $1 is the git sha1 to check
 function checkpatch_commit
 {
-	local commit cmd bug_lines non_i915_files rv
+	local commit rv checkpatch_options
 
 	commit=$1
-	cmd="git show --pretty=email $commit"
+	checkpatch_options="-q --emacs --strict --show-types -"
 
 	git --no-pager log --oneline -1 $commit
-	if ! $cmd | scripts/checkpatch.pl -q --emacs --strict --show-types -; then
+	if ! git show --pretty=email $commit |\
+			scripts/checkpatch.pl $checkpatch_options; then
 		rv=1
 	fi
 
-- 
2.11.0



More information about the Intel-gfx mailing list