From: Andy Whitcroft <apw@shadowen.org>
To: Andrew Morton <akpm@osdl.org>
Cc: Randy Dunlap <rdunlap@xenotime.net>,
Joel Schopp <jschopp@austin.ibm.com>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] update checkpatch.pl to version 0.19
Date: Thu, 1 May 2008 13:09:58 +0100 [thread overview]
Message-ID: <20080501120958.GB20475@shadowen.org> (raw)
In-Reply-To: <1209639893.0@pinky>
> return is not a function
Bah, no matter how much testing you do something always slips through.
This one is false triggering enough to warrent a fix.
Andrew, please suck this one up on top.
-apw
=== 8< ===
return is not a function -- tighten test
Tighten the return is not a function test so that we only report it on
the line it occurs.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
diff --git a/checkpatch.pl b/checkpatch.pl
index cc9cd7c..66f060e 100755
--- a/checkpatch.pl
+++ b/checkpatch.pl
@@ -1665,7 +1665,7 @@ sub process {
}
# Return is not a function.
- if (defined($stat) && $stat =~ /\breturn(\s*)(\(.*);/s) {
+ if (defined($stat) && $stat =~ /^.\s*return(\s*)(\(.*);/s) {
my $spacing = $1;
my $value = $2;
prev parent reply other threads:[~2008-05-01 12:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-01 11:04 Andy Whitcroft
2008-05-01 12:09 ` Andy Whitcroft [this message]
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=20080501120958.GB20475@shadowen.org \
--to=apw@shadowen.org \
--cc=akpm@osdl.org \
--cc=jschopp@austin.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rdunlap@xenotime.net \
/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®