[Qemu-devel] [PATCH 00/29] coccinelle script to enforce qemu/osdep.h macros usage

Philippe Mathieu-Daudé posted 29 patches 6 years, 8 months ago
Only 28 patches received!
accel/tcg/translate-all.c           |  2 +-
block/io.c                          |  4 +--
block/qcow2-cache.c                 |  2 +-
block/vhdx-log.c                    |  2 +-
block/vvfat.c                       |  2 +-
disas.c                             |  2 +-
disas/ia64.c                        |  4 +--
disas/m68k.c                        |  5 ++--
disas/ppc.c                         | 12 +++-----
disas/s390.c                        |  3 +-
hw/display/sm501_template.h         |  2 +-
hw/display/vmware_vga.c             |  5 ++--
hw/misc/pci-testdev.c               |  4 +--
hw/net/rocker/rocker.c              |  2 +-
hw/s390x/sclp.c                     |  4 +--
hw/scsi/scsi-disk.c                 |  4 +--
hw/timer/ds1338.c                   |  4 +--
migration/block.c                   |  2 +-
net/eth.c                           |  2 +-
qemu-img.c                          |  2 +-
qga/commands-posix.c                |  2 +-
scripts/coccinelle/use_osdep.cocci  | 60 +++++++++++++++++++++++++++++++++++++
target/cris/translate.c             |  6 ++--
target/lm32/translate.c             |  2 +-
target/microblaze/op_helper.c       |  3 +-
target/microblaze/translate.c       |  3 +-
target/nios2/translate.c            |  2 +-
target/sparc/cpu.c                  |  4 +--
tests/acpi-utils.h                  |  2 +-
tests/libqos/libqos.c               |  2 +-
tests/tcg/alpha/test-cond.c         |  2 +-
tests/tcg/alpha/test-ovf.c          |  2 +-
tests/test-hbitmap.c                |  6 ++--
tests/test-qobject-output-visitor.c |  2 +-
tests/test-string-output-visitor.c  |  2 +-
ui/console-gl.c                     |  2 +-
util/aio-posix.c                    |  2 +-
37 files changed, 114 insertions(+), 59 deletions(-)
create mode 100644 scripts/coccinelle/use_osdep.cocci
[Qemu-devel] [PATCH 00/29] coccinelle script to enforce qemu/osdep.h macros usage
Posted by Philippe Mathieu-Daudé 6 years, 8 months ago
Hi,

Another cocci script... Here the idea is to have the same script with all the
osdep.h macros related rules altogether.

First run with QEMU_IS_ALIGNED() and ARRAY_SIZE().

Regards,

Phil.

PD: I used the "enforce" word because I plan to have some continuous integration
job running such scripts (also the clang-tidy good stuff).

Philippe Mathieu-Daudé (29):
  coccinelle: add a script to enforce qemu/osdep.h macros usage
  pci: remove superfluous parenthesis
  qemu-img: use QEMU_IS_ALIGNED macro
  scsi-disk: use QEMU_IS_ALIGNED macro
  block: use QEMU_IS_ALIGNED macro
  migration/block: use QEMU_IS_ALIGNED macro
  ds1338: use QEMU_IS_ALIGNED macro
  ui: use QEMU_IS_ALIGNED macro
  net: use QEMU_IS_ALIGNED macro
  net/rocker: use QEMU_IS_ALIGNED macro
  s390x/sclp: use QEMU_IS_ALIGNED macro
  sm501: use QEMU_IS_ALIGNED macro
  tcg: use QEMU_IS_ALIGNED macro
  cris: use QEMU_IS_ALIGNED macro
  microblaze: use QEMU_IS_ALIGNED macro
  lm32: use QEMU_IS_ALIGNED macro
  sparc: use QEMU_IS_ALIGNED macro
  nios2: use QEMU_IS_ALIGNED macro
  disas: use QEMU_IS_ALIGNED macro
  disas: use ARRAY_SIZE macro
  qga: use ARRAY_SIZE macro
  vmsvga: use ARRAY_SIZE macro
  async: use ARRAY_SIZE macro
  tests/acpi: use ARRAY_SIZE macro
  tests/qos: use ARRAY_SIZE macro
  tests/tcg: use ARRAY_SIZE macro
  tests/hbitmap: use ARRAY_SIZE macro
  tests/qapi: use QEMU_IS_ALIGNED macro
  tests/qapi: use ARRAY_SIZE macro

 accel/tcg/translate-all.c           |  2 +-
 block/io.c                          |  4 +--
 block/qcow2-cache.c                 |  2 +-
 block/vhdx-log.c                    |  2 +-
 block/vvfat.c                       |  2 +-
 disas.c                             |  2 +-
 disas/ia64.c                        |  4 +--
 disas/m68k.c                        |  5 ++--
 disas/ppc.c                         | 12 +++-----
 disas/s390.c                        |  3 +-
 hw/display/sm501_template.h         |  2 +-
 hw/display/vmware_vga.c             |  5 ++--
 hw/misc/pci-testdev.c               |  4 +--
 hw/net/rocker/rocker.c              |  2 +-
 hw/s390x/sclp.c                     |  4 +--
 hw/scsi/scsi-disk.c                 |  4 +--
 hw/timer/ds1338.c                   |  4 +--
 migration/block.c                   |  2 +-
 net/eth.c                           |  2 +-
 qemu-img.c                          |  2 +-
 qga/commands-posix.c                |  2 +-
 scripts/coccinelle/use_osdep.cocci  | 60 +++++++++++++++++++++++++++++++++++++
 target/cris/translate.c             |  6 ++--
 target/lm32/translate.c             |  2 +-
 target/microblaze/op_helper.c       |  3 +-
 target/microblaze/translate.c       |  3 +-
 target/nios2/translate.c            |  2 +-
 target/sparc/cpu.c                  |  4 +--
 tests/acpi-utils.h                  |  2 +-
 tests/libqos/libqos.c               |  2 +-
 tests/tcg/alpha/test-cond.c         |  2 +-
 tests/tcg/alpha/test-ovf.c          |  2 +-
 tests/test-hbitmap.c                |  6 ++--
 tests/test-qobject-output-visitor.c |  2 +-
 tests/test-string-output-visitor.c  |  2 +-
 ui/console-gl.c                     |  2 +-
 util/aio-posix.c                    |  2 +-
 37 files changed, 114 insertions(+), 59 deletions(-)
 create mode 100644 scripts/coccinelle/use_osdep.cocci

-- 
2.13.2