From: Wolfram Sang <w.sang@pengutronix.de>
To: linux-kernel@vger.kernel.org
Cc: apw@shadowen.org
Subject: [PATCH] [CHECKPATCH] Check for p0-patches
Date: Sat, 20 Sep 2008 23:59:42 +0200 [thread overview]
Message-ID: <20080920215942.GA26888@pengutronix.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 1196 bytes --]
Check if the patch is most likely a p0-patch and give a warning if so.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
scripts/checkpatch.pl | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
Index: playground/scripts/checkpatch.pl
===================================================================
--- playground.orig/scripts/checkpatch.pl
+++ playground/scripts/checkpatch.pl
@@ -986,6 +986,7 @@
my $in_comment = 0;
my $comment_edge = 0;
my $first_line = 0;
+ my $p1_prefix = '';
my $prev_values = 'E';
@@ -1123,7 +1124,12 @@
# extract the filename as it passes
if ($line=~/^\+\+\+\s+(\S+)/) {
$realfile = $1;
- $realfile =~ s@^[^/]*/@@;
+ $realfile =~ s@^([^/]*)/@@;
+
+ $p1_prefix = $1;
+ if ($tree && -e "$root/$p1_prefix") {
+ WARN("Patch prefix '$p1_prefix' exists. Is it maybe a p0-patch?\n");
+ }
if ($realfile =~ m@include/asm/@) {
ERROR("do not modify files in include/asm, change architecture specific files in include/asm-<architecture>\n" . "$here$rawline\n");
--
Dipl.-Ing. Wolfram Sang | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
reply other threads:[~2008-09-20 21:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080920215942.GA26888@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=apw@shadowen.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®