[Intel-gfx] [maintainer-tools PATCH 2/2] dim: add dim sparse subcommand to run sparse on a commit range

Jani Nikula jani.nikula at intel.com
Wed Mar 16 17:40:04 UTC 2016


Run sparse only on files that have changed in the range. Replace dim
checker with the new one.

Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
 dim | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/dim b/dim
index 65985bc4909a..61745b556517 100755
--- a/dim
+++ b/dim
@@ -713,11 +713,14 @@ function dim_checkpatch
 	done
 }
 
-function dim_checker
+dim_alias_checker=sparse
+function dim_sparse
 {
-	rm drivers/gpu/drm/i915/*.o &> /dev/null || true
-	rm drivers/gpu/drm/i915/*.ko &> /dev/null || true
-	make C=1 drivers/gpu/drm/i915/i915.ko
+	local range=$(rangeish "$1")
+
+	make -j5
+	touch --no-create `git diff --name-only $range` `git diff --name-only`
+	make C=1
 }
 
 function prep_pull_mail_greetings
-- 
2.1.4



More information about the Intel-gfx mailing list