* [maintainer-tools PATCH 1/2] dim: abstract git commit range expansion helper
@ 2016-03-16 17:40 Jani Nikula
2016-03-16 17:40 ` [maintainer-tools PATCH 2/2] dim: add dim sparse subcommand to run sparse on a commit range Jani Nikula
0 siblings, 1 reply; 3+ messages in thread
From: Jani Nikula @ 2016-03-16 17:40 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
dim | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/dim b/dim
index 67671de198a0..65985bc4909a 100755
--- a/dim
+++ b/dim
@@ -690,19 +690,23 @@ function checkpatch_commit
fi
}
-dim_alias_check_patch=checkpatch
-dim_alias_cp=checkpatch
-function dim_checkpatch
+# turn $1 in to a git commit range
+function rangeish()
{
- local range
-
if [ -z "$1" ]; then
- range="HEAD^..HEAD"
+ echo "HEAD^..HEAD"
elif [ -n "`echo $1 | grep '\.\.'`" ]; then
- range="$1"
+ echo "$1"
else
- range="$1..HEAD"
+ echo "$1..HEAD"
fi
+}
+
+dim_alias_check_patch=checkpatch
+dim_alias_cp=checkpatch
+function dim_checkpatch
+{
+ local range=$(rangeish "$1")
for commit in $(git rev-list --reverse $range); do
checkpatch_commit $commit || true
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [maintainer-tools PATCH 2/2] dim: add dim sparse subcommand to run sparse on a commit range
2016-03-16 17:40 [maintainer-tools PATCH 1/2] dim: abstract git commit range expansion helper Jani Nikula
@ 2016-03-16 17:40 ` Jani Nikula
2016-03-21 9:13 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Jani Nikula @ 2016-03-16 17:40 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
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@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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [maintainer-tools PATCH 2/2] dim: add dim sparse subcommand to run sparse on a commit range
2016-03-16 17:40 ` [maintainer-tools PATCH 2/2] dim: add dim sparse subcommand to run sparse on a commit range Jani Nikula
@ 2016-03-21 9:13 ` Daniel Vetter
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2016-03-21 9:13 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
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@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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-21 9:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-16 17:40 [maintainer-tools PATCH 1/2] dim: abstract git commit range expansion helper Jani Nikula
2016-03-16 17:40 ` [maintainer-tools PATCH 2/2] dim: add dim sparse subcommand to run sparse on a commit range Jani Nikula
2016-03-21 9:13 ` Daniel Vetter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.