[PATCH 0/2] bulk: Remove pointless QOM casts

Philippe Mathieu-Daudé posted 2 patches 10 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230601093452.38972-1-philmd@linaro.org
Maintainers: Eric Blake <eblake@redhat.com>, Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Jan Kiszka <jan.kiszka@web.de>, Peter Maydell <peter.maydell@linaro.org>, Alistair Francis <alistair@alistair23.me>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Gerd Hoffmann <kraxel@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Xiaojuan Yang <yangxiaojuan@loongson.cn>, Song Gao <gaosong@loongson.cn>, Laurent Vivier <laurent@vivier.eu>, Huacai Chen <chenhuacai@kernel.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Jiaxun Yang <jiaxun.yang@flygoat.com>, "Cédric Le Goater" <clg@kaod.org>, Palmer Dabbelt <palmer@dabbelt.com>, Bin Meng <bin.meng@windriver.com>, Weiwei Li <liweiwei@iscas.ac.cn>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Yoshinori Sato <ysato@users.sourceforge.jp>, Fam Zheng <fam@euphon.net>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Artyom Tarasenko <atar4qemu@gmail.com>, David Hildenbrand <david@redhat.com>, Juan Quintela <quintela@redhat.com>, Peter Xu <peterx@redhat.com>, Leonardo Bras <leobras@redhat.com>, Lukas Straub <lukasstraub2@web.de>, John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Eduardo Habkost <eduardo@habkost.net>
MAINTAINERS                               |  1 +
block/nbd.c                               |  4 +-
chardev/char-pty.c                        |  2 +-
hw/arm/musicpal.c                         |  2 +-
hw/arm/xlnx-versal.c                      |  2 +-
hw/display/vhost-user-gpu.c               |  4 +-
hw/intc/loongarch_extioi.c                |  6 +--
hw/m68k/q800.c                            |  2 +-
hw/pci-host/bonito.c                      |  2 +-
hw/ppc/pnv_lpc.c                          |  2 +-
hw/ppc/pnv_occ.c                          |  2 +-
hw/ppc/pnv_sbe.c                          |  2 +-
hw/riscv/virt.c                           | 10 ++---
hw/rx/rx62n.c                             |  2 +-
hw/scsi/esp-pci.c                         | 18 ++++-----
hw/sparc/sun4m.c                          |  4 +-
hw/virtio/virtio-mem-pci.c                |  6 +--
hw/virtio/virtio-pmem-pci.c               |  6 +--
migration/fd.c                            |  4 +-
migration/multifd.c                       |  2 +-
migration/yank_functions.c                |  4 +-
nbd/client-connection.c                   |  2 +-
nbd/server.c                              |  2 +-
softmmu/qdev-monitor.c                    |  2 +-
ui/vnc-ws.c                               |  6 +--
scripts/qom-cast-macro-clean-cocci-gen.py | 49 +++++++++++++++++++++++
26 files changed, 99 insertions(+), 49 deletions(-)
create mode 100644 scripts/qom-cast-macro-clean-cocci-gen.py
[PATCH 0/2] bulk: Remove pointless QOM casts
Posted by Philippe Mathieu-Daudé 10 months, 3 weeks ago
As per Markus suggestion in [*], use Coccinelle to remove
pointless QOM cast macro uses. Since we have more than 1000
QOM types, add a script to generate the semantic patch.

[*] https://lore.kernel.org/qemu-devel/87mt1jafjt.fsf@pond.sub.org/

Philippe Mathieu-Daudé (2):
  scripts: Add qom-cast-macro-clean-cocci-gen.py
  bulk: Remove pointless QOM casts

 MAINTAINERS                               |  1 +
 block/nbd.c                               |  4 +-
 chardev/char-pty.c                        |  2 +-
 hw/arm/musicpal.c                         |  2 +-
 hw/arm/xlnx-versal.c                      |  2 +-
 hw/display/vhost-user-gpu.c               |  4 +-
 hw/intc/loongarch_extioi.c                |  6 +--
 hw/m68k/q800.c                            |  2 +-
 hw/pci-host/bonito.c                      |  2 +-
 hw/ppc/pnv_lpc.c                          |  2 +-
 hw/ppc/pnv_occ.c                          |  2 +-
 hw/ppc/pnv_sbe.c                          |  2 +-
 hw/riscv/virt.c                           | 10 ++---
 hw/rx/rx62n.c                             |  2 +-
 hw/scsi/esp-pci.c                         | 18 ++++-----
 hw/sparc/sun4m.c                          |  4 +-
 hw/virtio/virtio-mem-pci.c                |  6 +--
 hw/virtio/virtio-pmem-pci.c               |  6 +--
 migration/fd.c                            |  4 +-
 migration/multifd.c                       |  2 +-
 migration/yank_functions.c                |  4 +-
 nbd/client-connection.c                   |  2 +-
 nbd/server.c                              |  2 +-
 softmmu/qdev-monitor.c                    |  2 +-
 ui/vnc-ws.c                               |  6 +--
 scripts/qom-cast-macro-clean-cocci-gen.py | 49 +++++++++++++++++++++++
 26 files changed, 99 insertions(+), 49 deletions(-)
 create mode 100644 scripts/qom-cast-macro-clean-cocci-gen.py

-- 
2.38.1


Re: [PATCH 0/2] bulk: Remove pointless QOM casts
Posted by Richard Henderson 10 months, 3 weeks ago
On 6/1/23 02:34, Philippe Mathieu-Daudé wrote:
> As per Markus suggestion in [*], use Coccinelle to remove
> pointless QOM cast macro uses. Since we have more than 1000
> QOM types, add a script to generate the semantic patch.
> 
> [*]https://lore.kernel.org/qemu-devel/87mt1jafjt.fsf@pond.sub.org/
> 
> Philippe Mathieu-Daudé (2):
>    scripts: Add qom-cast-macro-clean-cocci-gen.py
>    bulk: Remove pointless QOM casts

Cool!

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~