From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH v2] dim: Avoid false positives with BUG detection
Date: Fri, 11 Mar 2016 15:31:23 +0000 [thread overview]
Message-ID: <1457710283-12722-1-git-send-email-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <1457710012-12589-1-git-send-email-tvrtko.ursulin@linux.intel.com>
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Makes sure that the diff line adding the BUG is not immediately
preceded by the diff line removing the BUG. Or in other words,
avoids false positives when existing BUG is edited.
v2: Sent the incomplete version out...
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
dim | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dim b/dim
index 1e7622a1e902..5392c64bf5b4 100755
--- a/dim
+++ b/dim
@@ -691,7 +691,8 @@ function shell_checkpatch
local cmd=$1
$cmd | scripts/checkpatch.pl -q --strict - || true
- if $cmd | grep '^\+.*\WBUG' > /dev/null; then
+ 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
$cmd | grep '^\+.*drm_i915_private_t' > /dev/null && echo "WARNING: New drm_i915_private_t added" || true
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-03-11 15:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-11 15:26 [PATCH] dim: Avoid false positives with BUG detection Tvrtko Ursulin
2016-03-11 15:31 ` Tvrtko Ursulin [this message]
2016-03-17 10:06 ` [PATCH v2] " Tvrtko Ursulin
2016-03-17 11:27 ` Jani Nikula
2016-03-18 15:42 ` Dave Gordon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457710283-12722-1-git-send-email-tvrtko.ursulin@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.