From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-4.0 1/4] checkpatch: fix premature exit when no input or --mailback
Date: Thu, 29 Nov 2018 15:03:59 +0100 [thread overview]
Message-ID: <c4b4eb4f-e879-1e97-e596-f2209115ca3c@redhat.com> (raw)
In-Reply-To: <20181129090120.28828-2-pbonzini@redhat.com>
On 29/11/18 10:01, Paolo Bonzini wrote:
> In some cases, checkpatch's process subroutine is exiting the
> whole process. This is wrong, just return from the subroutine
> instead.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> scripts/checkpatch.pl | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index eccd656c41..d58fcb1efd 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2869,19 +2869,19 @@ sub process {
> # If we have no input at all, then there is nothing to report on
> # so just keep quiet.
> if ($#rawlines == -1) {
> - exit(0);
> + return 1;
> }
>
> # In mailback mode only produce a report in the negative, for
> # things that appear to be patches.
> if ($mailback && ($clean == 1 || !$is_patch)) {
> - exit(0);
> + return 1;
> }
>
> # This is not a patch, and we are are in 'no-patch' mode so
> # just keep quiet.
> if (!$chk_patch && !$is_patch) {
> - exit(0);
> + return 1;
> }
>
> if (!$is_patch) {
>
next prev parent reply other threads:[~2018-11-29 14:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-29 9:01 [Qemu-devel] [PATCH for-4.0 0/4] Small checkpatch fixes and improvements Paolo Bonzini
2018-11-29 9:01 ` [Qemu-devel] [PATCH for-4.0 1/4] checkpatch: fix premature exit when no input or --mailback Paolo Bonzini
2018-11-29 14:03 ` Philippe Mathieu-Daudé [this message]
2018-11-29 16:20 ` Markus Armbruster
2018-11-29 9:01 ` [Qemu-devel] [PATCH for-4.0 2/4] checkpatch: check Signed-off-by in --mailback mode Paolo Bonzini
2018-11-29 14:04 ` Philippe Mathieu-Daudé
2018-11-29 16:21 ` Markus Armbruster
2018-11-29 17:50 ` Paolo Bonzini
2018-11-29 9:01 ` [Qemu-devel] [PATCH for-4.0 3/4] checkpatch: improve handling of multiple patches or files Paolo Bonzini
2018-11-29 9:01 ` [Qemu-devel] [PATCH for-4.0 4/4] checkpatch: colorize output to terminal Paolo Bonzini
2018-11-29 10:06 ` Paolo Bonzini
2018-11-29 14:09 ` Philippe Mathieu-Daudé
2018-11-29 16:41 ` Markus Armbruster
2018-11-30 5:12 ` [Qemu-devel] [PATCH for-4.0 0/4] Small checkpatch fixes and improvements no-reply
2018-11-30 19:34 ` no-reply
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=c4b4eb4f-e879-1e97-e596-f2209115ca3c@redhat.com \
--to=philmd@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).