[Qemu-devel] [PULL 00/29] Code cleanup patches

Marc-André Lureau posted 29 patches 8 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170831103432.6007-1-marcandre.lureau@redhat.com
Test FreeBSD passed
Test checkpatch failed
Test docker passed
Test s390x passed
include/ui/console.h        |  2 +-
linux-headers/asm-x86/kvm.h |  2 +-
block/dmg.c                 |  2 +-
block/qcow2-cluster.c       |  2 +-
block/vhdx-log.c            |  2 +-
block/vpc.c                 |  4 ++--
block/vvfat.c               |  4 ++--
hw/audio/pcspk.c            |  2 +-
hw/char/virtio-serial-bus.c |  8 ++++----
hw/display/vga.c            |  2 +-
hw/display/virtio-gpu.c     |  4 ++--
hw/i386/multiboot.c         |  3 +--
hw/net/eepro100.c           |  3 +--
hw/pci-host/piix.c          |  2 +-
hw/pci-host/q35.c           |  2 +-
hw/pci/msix.c               |  4 ++--
hw/timer/i8254_common.c     |  4 ++--
hw/usb/dev-hub.c            |  8 ++++----
hw/virtio/vhost.c           |  2 +-
libdecnumber/decNumber.c    |  2 +-
monitor.c                   |  4 ++--
target/i386/arch_dump.c     | 40 ++++++++++++++++++++--------------------
target/ppc/mem_helper.c     |  2 +-
target/ppc/translate.c      |  2 +-
tests/test-iov.c            |  3 +--
ui/cursor.c                 |  2 +-
ui/vnc-enc-tight.c          |  2 +-
ui/vnc.c                    | 10 +++++-----
28 files changed, 63 insertions(+), 66 deletions(-)
[Qemu-devel] [PULL 00/29] Code cleanup patches
Posted by Marc-André Lureau 8 years, 2 months ago
The following changes since commit 1201d308519f1e915866d7583d5136d03cc1d384:

  slirp: fix clearing ifq_so from pending packets (2017-08-30 23:14:34 +0100)

are available in the git repository at:

  https://github.com/elmarco/qemu.git tags/tidy-pull-request

for you to fetch changes up to e4d67e4f2e06128bc7f07263afe9acc2e2242fdc:

  eepro100: replace g_malloc()+memcpy() with g_memdup() (2017-08-31 12:29:07 +0200)

----------------------------------------------------------------

----------------------------------------------------------------

Marc-André Lureau (29):
  i386: use ROUND_UP macro
  vnc: use QEMU_ALIGN_DOWN
  vhdx: use QEMU_ALIGN_DOWN
  vhost: use QEMU_ALIGN_DOWN
  i8254: use QEMU_ALIGN_DOWN
  pcspk: use QEMU_ALIGN_DOWN
  dmg: use DIV_ROUND_UP
  qcow2: use DIV_ROUND_UP
  vpc: use DIV_ROUND_UP
  vvfat: use DIV_ROUND_UP
  vnc: use DIV_ROUND_UP
  ui: use DIV_ROUND_UP
  vga: use DIV_ROUND_UP
  virtio-gpu: use DIV_ROUND_UP
  monitor: use DIV_ROUND_UP
  console: use DIV_ROUND_UP
  virtio-serial: use DIV_ROUND_UP
  piix: use DIV_ROUND_UP
  q35: use DIV_ROUND_UP
  usb-hub: use DIV_ROUND_UP
  msix: use DIV_ROUND_UP
  ppc: use DIV_ROUND_UP
  i386/dump: use DIV_ROUND_UP
  kvm: use DIV_ROUND_UP
  decnumber: use DIV_ROUND_UP
  i386: introduce ELF_NOTE_SIZE macro
  i386: replace g_malloc()+memcpy() with g_memdup()
  test-iov: replace g_malloc()+memcpy() with g_memdup()
  eepro100: replace g_malloc()+memcpy() with g_memdup()

 include/ui/console.h        |  2 +-
 linux-headers/asm-x86/kvm.h |  2 +-
 block/dmg.c                 |  2 +-
 block/qcow2-cluster.c       |  2 +-
 block/vhdx-log.c            |  2 +-
 block/vpc.c                 |  4 ++--
 block/vvfat.c               |  4 ++--
 hw/audio/pcspk.c            |  2 +-
 hw/char/virtio-serial-bus.c |  8 ++++----
 hw/display/vga.c            |  2 +-
 hw/display/virtio-gpu.c     |  4 ++--
 hw/i386/multiboot.c         |  3 +--
 hw/net/eepro100.c           |  3 +--
 hw/pci-host/piix.c          |  2 +-
 hw/pci-host/q35.c           |  2 +-
 hw/pci/msix.c               |  4 ++--
 hw/timer/i8254_common.c     |  4 ++--
 hw/usb/dev-hub.c            |  8 ++++----
 hw/virtio/vhost.c           |  2 +-
 libdecnumber/decNumber.c    |  2 +-
 monitor.c                   |  4 ++--
 target/i386/arch_dump.c     | 40 ++++++++++++++++++++--------------------
 target/ppc/mem_helper.c     |  2 +-
 target/ppc/translate.c      |  2 +-
 tests/test-iov.c            |  3 +--
 ui/cursor.c                 |  2 +-
 ui/vnc-enc-tight.c          |  2 +-
 ui/vnc.c                    | 10 +++++-----
 28 files changed, 63 insertions(+), 66 deletions(-)

-- 
2.14.1.146.gd35faa819


Re: [Qemu-devel] [PULL 00/29] Code cleanup patches
Posted by no-reply@patchew.org 8 years, 2 months ago
Hi,

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

Message-id: 20170831103432.6007-1-marcandre.lureau@redhat.com
Subject: [Qemu-devel] [PULL 00/29] Code cleanup patches
Type: series

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

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

git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --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
Switched to a new branch 'test'
bfdcbc576e eepro100: replace g_malloc()+memcpy() with g_memdup()
a1c4854e8b test-iov: replace g_malloc()+memcpy() with g_memdup()
2c77608691 i386: replace g_malloc()+memcpy() with g_memdup()
93d9646914 i386: introduce ELF_NOTE_SIZE macro
fbd21c5829 decnumber: use DIV_ROUND_UP
56f4d8fdf8 kvm: use DIV_ROUND_UP
b4d3b684fb i386/dump: use DIV_ROUND_UP
8226995a17 ppc: use DIV_ROUND_UP
d9362c2ee8 msix: use DIV_ROUND_UP
dd7f3bcb7b usb-hub: use DIV_ROUND_UP
d536c67324 q35: use DIV_ROUND_UP
18d0153d19 piix: use DIV_ROUND_UP
46fbd728ce virtio-serial: use DIV_ROUND_UP
f1d2d54e80 console: use DIV_ROUND_UP
d04feeb2a5 monitor: use DIV_ROUND_UP
04b7e3bd97 virtio-gpu: use DIV_ROUND_UP
a8cb44a57c vga: use DIV_ROUND_UP
8967c4cb15 ui: use DIV_ROUND_UP
86f1a7ca7c vnc: use DIV_ROUND_UP
0c3d5b7afd vvfat: use DIV_ROUND_UP
44a6bcbec7 vpc: use DIV_ROUND_UP
92af37ca5c qcow2: use DIV_ROUND_UP
ee4f5642d9 dmg: use DIV_ROUND_UP
bb6aafe639 pcspk: use QEMU_ALIGN_DOWN
342d4c3f03 i8254: use QEMU_ALIGN_DOWN
baabc85bab vhost: use QEMU_ALIGN_DOWN
9cd8dfdb10 vhdx: use QEMU_ALIGN_DOWN
b4164d6638 vnc: use QEMU_ALIGN_DOWN
9646df7885 i386: use ROUND_UP macro

=== OUTPUT BEGIN ===
Checking PATCH 1/29: i386: use ROUND_UP macro...
Checking PATCH 2/29: vnc: use QEMU_ALIGN_DOWN...
Checking PATCH 3/29: vhdx: use QEMU_ALIGN_DOWN...
Checking PATCH 4/29: vhost: use QEMU_ALIGN_DOWN...
Checking PATCH 5/29: i8254: use QEMU_ALIGN_DOWN...
Checking PATCH 6/29: pcspk: use QEMU_ALIGN_DOWN...
ERROR: line over 90 characters
#25: FILE: hw/audio/pcspk.c:72:
+        s->samples = (QEMU_ALIGN_DOWN(PCSPK_BUF_LEN * PIT_FREQ, m) / (PIT_FREQ >> 1) + 1) >> 1;

total: 1 errors, 0 warnings, 8 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 7/29: dmg: use DIV_ROUND_UP...
Checking PATCH 8/29: qcow2: use DIV_ROUND_UP...
Checking PATCH 9/29: vpc: use DIV_ROUND_UP...
Checking PATCH 10/29: vvfat: use DIV_ROUND_UP...
ERROR: "(foo*)" should be "(foo *)"
#35: FILE: block/vvfat.c:2557:
+            (uint8_t*)cluster, DIV_ROUND_UP(rest_size, 0x200));

total: 1 errors, 0 warnings, 16 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 11/29: vnc: use DIV_ROUND_UP...
WARNING: line over 80 characters
#38: FILE: ui/vnc.c:2784:
+        guest_ll = pixman_image_get_width(vd->guest.fb) * (DIV_ROUND_UP(guest_bpp, 8));

total: 0 errors, 1 warnings, 16 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 12/29: ui: use DIV_ROUND_UP...
Checking PATCH 13/29: vga: use DIV_ROUND_UP...
Checking PATCH 14/29: virtio-gpu: use DIV_ROUND_UP...
Checking PATCH 15/29: monitor: use DIV_ROUND_UP...
Checking PATCH 16/29: console: use DIV_ROUND_UP...
Checking PATCH 17/29: virtio-serial: use DIV_ROUND_UP...
WARNING: line over 80 characters
#54: FILE: hw/char/virtio-serial-bus.c:1078:
+    vser->ports_map = g_malloc0((DIV_ROUND_UP(vser->serial.max_virtserial_ports, 32))

total: 0 errors, 1 warnings, 32 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 18/29: piix: use DIV_ROUND_UP...
Checking PATCH 19/29: q35: use DIV_ROUND_UP...
Checking PATCH 20/29: usb-hub: use DIV_ROUND_UP...
Checking PATCH 21/29: msix: use DIV_ROUND_UP...
Checking PATCH 22/29: ppc: use DIV_ROUND_UP...
Checking PATCH 23/29: i386/dump: use DIV_ROUND_UP...
WARNING: line over 80 characters
#27: FILE: target/i386/arch_dump.c:80:
+    note_size = (DIV_ROUND_UP(sizeof(Elf64_Nhdr), 4) + DIV_ROUND_UP(name_size, 4) +

WARNING: line over 80 characters
#38: FILE: target/i386/arch_dump.c:159:
+    note_size = (DIV_ROUND_UP(sizeof(Elf64_Nhdr), 4) + DIV_ROUND_UP(name_size, 4) +

WARNING: line over 80 characters
#49: FILE: target/i386/arch_dump.c:214:
+    note_size = (DIV_ROUND_UP(sizeof(Elf32_Nhdr), 4) + DIV_ROUND_UP(name_size, 4) +

WARNING: line over 80 characters
#73: FILE: target/i386/arch_dump.c:446:
+    elf_note_size = (DIV_ROUND_UP(note_head_size, 4) + DIV_ROUND_UP(name_size, 4) +

WARNING: line over 80 characters
#75: FILE: target/i386/arch_dump.c:448:
+    qemu_note_size = (DIV_ROUND_UP(note_head_size, 4) + DIV_ROUND_UP(name_size, 4) +

total: 0 errors, 5 warnings, 54 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 24/29: kvm: use DIV_ROUND_UP...
Checking PATCH 25/29: decnumber: use DIV_ROUND_UP...
ERROR: code indent should never use tabs
#25: FILE: libdecnumber/decNumber.c:4778:
+^I    *(up-1)+=DIV_ROUND_UP(DECDPUNMAX, 2);$

ERROR: spaces required around that '-' (ctx:VxV)
#25: FILE: libdecnumber/decNumber.c:4778:
+	    *(up-1)+=DIV_ROUND_UP(DECDPUNMAX, 2);
 	        ^

ERROR: spaces required around that '+=' (ctx:VxV)
#25: FILE: libdecnumber/decNumber.c:4778:
+	    *(up-1)+=DIV_ROUND_UP(DECDPUNMAX, 2);
 	           ^

total: 3 errors, 0 warnings, 8 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 26/29: i386: introduce ELF_NOTE_SIZE macro...
Checking PATCH 27/29: i386: replace g_malloc()+memcpy() with g_memdup()...
Checking PATCH 28/29: test-iov: replace g_malloc()+memcpy() with g_memdup()...
Checking PATCH 29/29: eepro100: replace g_malloc()+memcpy() with g_memdup()...
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
Re: [Qemu-devel] [PULL 00/29] Code cleanup patches
Posted by Peter Maydell 8 years, 2 months ago
On 31 August 2017 at 11:34, Marc-André Lureau
<marcandre.lureau@redhat.com> wrote:
> The following changes since commit 1201d308519f1e915866d7583d5136d03cc1d384:
>
>   slirp: fix clearing ifq_so from pending packets (2017-08-30 23:14:34 +0100)
>
> are available in the git repository at:
>
>   https://github.com/elmarco/qemu.git tags/tidy-pull-request
>
> for you to fetch changes up to e4d67e4f2e06128bc7f07263afe9acc2e2242fdc:
>
>   eepro100: replace g_malloc()+memcpy() with g_memdup() (2017-08-31 12:29:07 +0200)
>
> ----------------------------------------------------------------
>

Applied, thanks.

-- PMM