From: Li Zefan <lizf@cn.fujitsu.com>
To: apw@shadowen.org
Cc: Randy Dunlap <rdunlap@xenotime.net>, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH][try #2] checkpatch: clear the report buffer after processing a file
Date: Tue, 15 Jan 2008 17:45:23 +0800 [thread overview]
Message-ID: <478C80B3.4060106@cn.fujitsu.com> (raw)
When checking multiple files, the report buffer is not cleared
after processing a file, thus the report will be printed again
and again, mixing up with other reports.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
scripts/checkpatch.pl | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 579f50f..a88f7a1 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -624,16 +624,15 @@ sub possible {
my $prefix = '';
-my @report = ();
sub report {
my $line = $prefix . $_[0];
$line = (split('\n', $line))[0] . "\n" if ($terse);
- push(@report, $line);
+ push(our @report, $line);
}
sub report_dump {
- @report;
+ our @report;
}
sub ERROR {
report("ERROR: $_[0]\n");
@@ -670,6 +669,7 @@ sub process {
my $signoff = 0;
my $is_patch = 0;
+ our @report = ();
our $cnt_lines = 0;
our $cnt_error = 0;
our $cnt_warn = 0;
--
1.5.3.rc7
next reply other threads:[~2008-01-15 9:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-15 9:45 Li Zefan [this message]
2008-01-17 18:30 ` [PATCH][try #2] checkpatch: clear the report buffer after processing a file Andy Whitcroft
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=478C80B3.4060106@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=apw@shadowen.org \
--cc=linux-kernel@vger.kernel.org \
--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 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.