mbox

[PULL,for-2.7,0/4] Error reporting patches for 2016-08-08

Message ID 1470640761-17579-1-git-send-email-armbru@redhat.com
State New
Headers show

Pull-request

git://repo.or.cz/qemu/armbru.git tags/pull-error-2016-08-08

Message

Markus Armbruster Aug. 8, 2016, 7:19 a.m. UTC
The following changes since commit 51009170d8fc263cfdcd5a60fe3ba213daa3d15b:

  tests: Rename qtests which have names ending "error" (2016-08-05 15:27:15 +0100)

are available in the git repository at:

  git://repo.or.cz/qemu/armbru.git tags/pull-error-2016-08-08

for you to fetch changes up to 7ea7d36e3493d4dac7f20e46d0ca499bbb3251a6:

  error: Fix error_printf() calls lacking newlines (2016-08-08 09:01:27 +0200)

----------------------------------------------------------------
Error reporting patches for 2016-08-08

----------------------------------------------------------------
Markus Armbruster (4):
      error: Strip trailing '\n' from error string arguments (again)
      checkpatch: Fix newline detection in error_setg() & friends
      vfio: Use error_report() instead of error_printf() for errors
      error: Fix error_printf() calls lacking newlines

 hw/i386/pc.c                             |  2 +-
 hw/mips/cps.c                            |  2 +-
 hw/nvram/fw_cfg.c                        |  2 +-
 hw/ppc/spapr_cpu_core.c                  |  2 +-
 hw/vfio/platform.c                       |  2 +-
 kvm-all.c                                |  2 +-
 qemu-img.c                               |  4 ++--
 scripts/checkpatch.pl                    |  5 ++++-
 scripts/coccinelle/err-bad-newline.cocci | 29 +++++++++++++++++++++++++++++
 slirp/slirp.c                            |  8 ++++----
 target-i386/kvm.c                        |  2 +-
 ui/vnc.c                                 |  2 +-
 12 files changed, 47 insertions(+), 15 deletions(-)
 create mode 100644 scripts/coccinelle/err-bad-newline.cocci

Comments

no-reply@patchew.org Aug. 8, 2016, 7:29 a.m. UTC | #1
Hi,

Your series seems to have some coding style problems. See output below for
more information:

Message-id: 1470640761-17579-1-git-send-email-armbru@redhat.com
Type: series
Subject: [Qemu-devel] [PULL for-2.7 0/4] Error reporting patches for 2016-08-08

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git show --no-patch --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/1470640761-17579-1-git-send-email-armbru@redhat.com -> patchew/1470640761-17579-1-git-send-email-armbru@redhat.com
Switched to a new branch 'test'
ab5847c error: Fix error_printf() calls lacking newlines
51b0c39 vfio: Use error_report() instead of error_printf() for errors
5c88cff checkpatch: Fix newline detection in error_setg() & friends
b194612 error: Strip trailing '\n' from error string arguments (again)

=== OUTPUT BEGIN ===
Checking PATCH 1/4: error: Strip trailing '\n' from error string arguments (again)...
Checking PATCH 2/4: checkpatch: Fix newline detection in error_setg() & friends...
ERROR: code indent should never use tabs
#27: FILE: scripts/checkpatch.pl:2517:
+^I^I^I^Ierror_setg_file_open|$

ERROR: code indent should never use tabs
#29: FILE: scripts/checkpatch.pl:2519:
+^I^I^I^Ierror_prepend|$

ERROR: code indent should never use tabs
#30: FILE: scripts/checkpatch.pl:2520:
+^I^I^I^Ierror_reportf_err|$

ERROR: code indent should never use tabs
#35: FILE: scripts/checkpatch.pl:2524:
+^Iif ($rawline =~ /\b(?:$qemu_error_funcs)\s*\(.*\".*\\n/) {$

total: 4 errors, 0 warnings, 15 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 3/4: vfio: Use error_report() instead of error_printf() for errors...
Checking PATCH 4/4: error: Fix error_printf() calls lacking newlines...
=== OUTPUT END ===

Test command exited with code: 1
Peter Maydell Aug. 8, 2016, 12:56 p.m. UTC | #2
On 8 August 2016 at 08:19, Markus Armbruster <armbru@redhat.com> wrote:
> The following changes since commit 51009170d8fc263cfdcd5a60fe3ba213daa3d15b:
>
>   tests: Rename qtests which have names ending "error" (2016-08-05 15:27:15 +0100)
>
> are available in the git repository at:
>
>   git://repo.or.cz/qemu/armbru.git tags/pull-error-2016-08-08
>
> for you to fetch changes up to 7ea7d36e3493d4dac7f20e46d0ca499bbb3251a6:
>
>   error: Fix error_printf() calls lacking newlines (2016-08-08 09:01:27 +0200)
>
> ----------------------------------------------------------------
> Error reporting patches for 2016-08-08
>
> ----------------------------------------------------------------
> Markus Armbruster (4):
>       error: Strip trailing '\n' from error string arguments (again)
>       checkpatch: Fix newline detection in error_setg() & friends
>       vfio: Use error_report() instead of error_printf() for errors
>       error: Fix error_printf() calls lacking newlines

Applied, thanks.

-- PMM
Markus Armbruster Aug. 8, 2016, 2:58 p.m. UTC | #3
Automated trivial patch checking at work, woot!

I dropped no-reply@ec2-52-6-146-230.compute-1.amazonaws.com manually.
Fam, you might want to add a Reply-to: header.

no-reply@ec2-52-6-146-230.compute-1.amazonaws.com writes:

> Hi,
>
> Your series seems to have some coding style problems. See output below for
> more information:
>
> Message-id: 1470640761-17579-1-git-send-email-armbru@redhat.com
> Type: series
> Subject: [Qemu-devel] [PULL for-2.7 0/4] Error reporting patches for 2016-08-08
>
> === TEST SCRIPT BEGIN ===
> #!/bin/bash
>
> BASE=base
> n=1
> total=$(git log --oneline $BASE.. | wc -l)
> failed=0
>
> commits="$(git log --format=%H --reverse $BASE..)"
> for c in $commits; do
>     echo "Checking PATCH $n/$total: $(git show --no-patch --format=%s $c)..."
>     if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
>         failed=1
>         echo
>     fi
>     n=$((n+1))
> done
>
> exit $failed
> === TEST SCRIPT END ===
>
> Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
> From https://github.com/patchew-project/qemu
>  * [new tag]         patchew/1470640761-17579-1-git-send-email-armbru@redhat.com -> patchew/1470640761-17579-1-git-send-email-armbru@redhat.com
> Switched to a new branch 'test'
> ab5847c error: Fix error_printf() calls lacking newlines
> 51b0c39 vfio: Use error_report() instead of error_printf() for errors
> 5c88cff checkpatch: Fix newline detection in error_setg() & friends
> b194612 error: Strip trailing '\n' from error string arguments (again)
>
> === OUTPUT BEGIN ===
> Checking PATCH 1/4: error: Strip trailing '\n' from error string arguments (again)...
> Checking PATCH 2/4: checkpatch: Fix newline detection in error_setg() & friends...
> ERROR: code indent should never use tabs
> #27: FILE: scripts/checkpatch.pl:2517:
> +^I^I^I^Ierror_setg_file_open|$
>
> ERROR: code indent should never use tabs
> #29: FILE: scripts/checkpatch.pl:2519:
> +^I^I^I^Ierror_prepend|$
>
> ERROR: code indent should never use tabs
> #30: FILE: scripts/checkpatch.pl:2520:
> +^I^I^I^Ierror_reportf_err|$
>
> ERROR: code indent should never use tabs
> #35: FILE: scripts/checkpatch.pl:2524:
> +^Iif ($rawline =~ /\b(?:$qemu_error_funcs)\s*\(.*\".*\\n/) {$
>
> total: 4 errors, 0 warnings, 15 lines checked
>
> Your patch has style problems, please review.  If any of these errors
> are false positives report them to the maintainer, see
> CHECKPATCH in MAINTAINERS.
>
> Checking PATCH 3/4: vfio: Use error_report() instead of error_printf() for errors...
> Checking PATCH 4/4: error: Fix error_printf() calls lacking newlines...
> === OUTPUT END ===
>
> Test command exited with code: 1

I refrained from expanding tabs in the lines I touched.  26 out of 35
patches touching checkpatch.pl add tabs.  1911 out of 2615
checkpatch.pl's lines contain tabs.

Perhaps we should suppress this error for checkpatch.pl itself.  Or we
should make up our minds once and for all to expand tabs there.
Fam Zheng Aug. 9, 2016, 7:21 a.m. UTC | #4
On Mon, 08/08 16:58, Markus Armbruster wrote:
> Automated trivial patch checking at work, woot!
> 
> I dropped no-reply@ec2-52-6-146-230.compute-1.amazonaws.com manually.
> Fam, you might want to add a Reply-to: header.
> 
> no-reply@ec2-52-6-146-230.compute-1.amazonaws.com writes:
> 
> > Hi,
> >
> > Your series seems to have some coding style problems. See output below for
> > more information:
> >
> > Message-id: 1470640761-17579-1-git-send-email-armbru@redhat.com
> > Type: series
> > Subject: [Qemu-devel] [PULL for-2.7 0/4] Error reporting patches for 2016-08-08
> >
> > === TEST SCRIPT BEGIN ===
> > #!/bin/bash
> >
> > BASE=base
> > n=1
> > total=$(git log --oneline $BASE.. | wc -l)
> > failed=0
> >
> > commits="$(git log --format=%H --reverse $BASE..)"
> > for c in $commits; do
> >     echo "Checking PATCH $n/$total: $(git show --no-patch --format=%s $c)..."
> >     if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
> >         failed=1
> >         echo
> >     fi
> >     n=$((n+1))
> > done
> >
> > exit $failed
> > === TEST SCRIPT END ===
> >
> > Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
> > From https://github.com/patchew-project/qemu
> >  * [new tag]         patchew/1470640761-17579-1-git-send-email-armbru@redhat.com -> patchew/1470640761-17579-1-git-send-email-armbru@redhat.com
> > Switched to a new branch 'test'
> > ab5847c error: Fix error_printf() calls lacking newlines
> > 51b0c39 vfio: Use error_report() instead of error_printf() for errors
> > 5c88cff checkpatch: Fix newline detection in error_setg() & friends
> > b194612 error: Strip trailing '\n' from error string arguments (again)
> >
> > === OUTPUT BEGIN ===
> > Checking PATCH 1/4: error: Strip trailing '\n' from error string arguments (again)...
> > Checking PATCH 2/4: checkpatch: Fix newline detection in error_setg() & friends...
> > ERROR: code indent should never use tabs
> > #27: FILE: scripts/checkpatch.pl:2517:
> > +^I^I^I^Ierror_setg_file_open|$
> >
> > ERROR: code indent should never use tabs
> > #29: FILE: scripts/checkpatch.pl:2519:
> > +^I^I^I^Ierror_prepend|$
> >
> > ERROR: code indent should never use tabs
> > #30: FILE: scripts/checkpatch.pl:2520:
> > +^I^I^I^Ierror_reportf_err|$
> >
> > ERROR: code indent should never use tabs
> > #35: FILE: scripts/checkpatch.pl:2524:
> > +^Iif ($rawline =~ /\b(?:$qemu_error_funcs)\s*\(.*\".*\\n/) {$
> >
> > total: 4 errors, 0 warnings, 15 lines checked
> >
> > Your patch has style problems, please review.  If any of these errors
> > are false positives report them to the maintainer, see
> > CHECKPATCH in MAINTAINERS.
> >
> > Checking PATCH 3/4: vfio: Use error_report() instead of error_printf() for errors...
> > Checking PATCH 4/4: error: Fix error_printf() calls lacking newlines...
> > === OUTPUT END ===
> >
> > Test command exited with code: 1
> 
> I refrained from expanding tabs in the lines I touched.  26 out of 35
> patches touching checkpatch.pl add tabs.  1911 out of 2615
> checkpatch.pl's lines contain tabs.
> 
> Perhaps we should suppress this error for checkpatch.pl itself.  Or we
> should make up our minds once and for all to expand tabs there.

Not worth enough to pollute the git blame output IMO.

Perhaps tabs can be ignored by checkpatch.pl when the surrounding untouched
code uses tabs already? That's not an ultimate solution to the tab vs space
dilemma when writing patches to such files, but this seems a relatively
common pattern of ignored warning.

Fam