* + checkpatch-allow-c99-style-comments.patch added to -mm tree
@ 2016-07-13 22:09 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2016-07-13 22:09 UTC (permalink / raw)
To: joe, mm-commits
The patch titled
Subject: checkpatch: allow c99 style // comments
has been added to the -mm tree. Its filename is
checkpatch-allow-c99-style-comments.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/checkpatch-allow-c99-style-comments.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-allow-c99-style-comments.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Joe Perches <joe@perches.com>
Subject: checkpatch: allow c99 style // comments
Sanitise the lines that contain c99 comments so that the error doesn't get
emitted.
Link: http://lkml.kernel.org/r/d4d22c34ad7bcc1bceb52f0742f76b7a6d585235.1468368420.git.joe@perches.com
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
scripts/checkpatch.pl | 6 ++++++
1 file changed, 6 insertions(+)
diff -puN scripts/checkpatch.pl~checkpatch-allow-c99-style-comments scripts/checkpatch.pl
--- a/scripts/checkpatch.pl~checkpatch-allow-c99-style-comments
+++ a/scripts/checkpatch.pl
@@ -55,6 +55,7 @@ my $spelling_file = "$D/spelling.txt";
my $codespell = 0;
my $codespellfile = "/usr/share/codespell/dictionary.txt";
my $color = 1;
+my $allow_c99_comments = 1;
sub help {
my ($exitcode) = @_;
@@ -1145,6 +1146,11 @@ sub sanitise_line {
$res =~ s@(\#\s*(?:error|warning)\s+).*@$1$clean@;
}
+ if ($allow_c99_comments && $res =~ m@(//.*$)@) {
+ my $match = $1;
+ $res =~ s/\Q$match\E/"$;" x length($match)/e;
+ }
+
return $res;
}
_
Patches currently in -mm which might be from joe@perches.com are
printk-create-pr_level-functions.patch
checkpatch-skip-long-lines-that-use-an-efi_guid-macro.patch
checkpatch-allow-c99-style-comments.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-07-13 22:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-13 22:09 + checkpatch-allow-c99-style-comments.patch added to -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).