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

Daniel Vetter daniel at ffwll.ch
Mon Mar 21 09:13:55 UTC 2016


On Wed, Mar 16, 2016 at 07:40:04PM +0200, Jani Nikula wrote:
> 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>

Need to update the help to align with check-patch. And maybe move them
together. And perhaps rename the command to sparse-patch or something, or
check-sparse or whatever, for a bit more consistency in these.

With that bikeshed address, ack on both.
-Daniel

> ---
>  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
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list