From patchwork Wed Sep 2 22:42:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 274777 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F83AC43461 for ; Wed, 2 Sep 2020 22:44:06 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E38E520758 for ; Wed, 2 Sep 2020 22:44:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AWY3I6CV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E38E520758 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDbU5-0001Rg-2A for qemu-devel@archiver.kernel.org; Wed, 02 Sep 2020 18:44:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDbTM-0000LY-8j for qemu-devel@nongnu.org; Wed, 02 Sep 2020 18:43:20 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:38909 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kDbTJ-0008CS-9f for qemu-devel@nongnu.org; Wed, 02 Sep 2020 18:43:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599086595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fRlYLbc9zHK5rDuw+XIkRaWceHtEHyftTw23lCFH6IM=; b=AWY3I6CVtlE+Y9Ia6eJru5/JL3Lla65/3kyqQhPVLZPnk3YuR22aD/itjNgVo2GMbSomsE 5x9PJwEF74UXk12fRIGJp2epyOmKeNRiMGZJAkFXsxvu+Ua5sSEl/EMxh5SzaJtiy63wvu sfbVlFybwUxENq06/tJX45alPlynRqY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-433-Krc5UJy0NaG4XRlXhNdz3A-1; Wed, 02 Sep 2020 18:43:12 -0400 X-MC-Unique: Krc5UJy0NaG4XRlXhNdz3A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 11F2A1DE00 for ; Wed, 2 Sep 2020 22:43:12 +0000 (UTC) Received: from localhost (ovpn-66-226.rdu2.redhat.com [10.10.66.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB18419C71; Wed, 2 Sep 2020 22:43:11 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 00/63] qom: Rename macros for consistency Date: Wed, 2 Sep 2020 18:42:08 -0400 Message-Id: <20200902224311.1321159-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=ehabkost@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/02 16:25:58 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reducing boilerplate QOM code using the new OBJECT_DEFINE_* and OBJECT_DECLARE_* macros is quite difficult when there are multiple ways a TYPE_* constant name is written. This series renames many type checking macros and/or TYPE_* constants to make sure they are consistent. This series is based on machine-next and can be fetched from: https://github.com/ehabkost/qemu-hacks work/qom-rename-macros Eduardo Habkost (63): gpex: Fix type checking function name chardev: Rename TYPE_CHARDEV_* to TYPE_*_CHARDEV chardev: Rename TYPE_BRAILLE_CHARDEV to TYPE_BAUM_CHARDEV chardev: Rename TYPE_MSMOUSE_CHARDEV to TYPE_MOUSE_CHARDEV ap-device: Rename AP_DEVICE_TYPE to TYPE_AP_DEVICE dev-smartcard-reader: Rename CCID_DEV_NAME to TYPE_USB_CCID_DEV rdma: Rename PVRDMA_HW_NAME to TYPE_PVRDMA_DEV vfio: Rename VFIO_AP_DEVICE_TYPE to TYPE_VFIO_AP_DEVICE vmcoreinfo: Rename VMCOREINFO_DEVICE to TYPE_VMCOREINFO vmgenid: Rename VMGENID_DEVICE to TYPE_VMGENID edu: Rename TYPE_PCI_EDU_DEVICE to TYPE_EDU etrax: Rename TYPE_ETRAX_FS_SERIAL to TYPE_ETRAX_SERIAL etrax: Rename TYPE_ETRAX_FS_TIMER to TYPE_ETRAX_TIMER i8254: Rename TYPE_I8254 to TYPE_PIT i8259: Rename TYPE_I8259 to TYPE_PIC i8259: Rename TYPE_KVM_I8259 to TYPE_KVM_PIC intel-hda: Rename TYPE_INTEL_HDA_GENERIC to TYPE_INTEL_HDA mips: Rename TYPE_MIPS_BOSTON to TYPE_BOSTON mptsas: Rename TYPE_MPTSAS1068 to TYPE_MPT_SAS pc87312: Rename TYPE_PC87312_SUPERIO to TYPE_PC87312 pxb: Rename TYPE_PXB_DEVICE to TYPE_PXB_DEV pxb: Rename TYPE_PXB_PCIE_DEVICE to TYPE_PXB_PCIE_DEV ramfb: Rename TYPE_RAMFB_DEVICE to TYPE_RAMFB scsi: Rename TYPE_AM53C974_DEVICE to TYPE_PCI_ESP scsi: Rename TYPE_DC390_DEVICE to TYPE_DC390 sun4m: Rename TYPE_SUN4M_MEMORY to TYPE_SUN4M_RAM sun4u: Rename TYPE_SUN4U_MEMORY to TYPE_SUN4U_RAM tusb6010: Rename TYPE_TUSB6010 to TYPE_TUSB versatile: Rename TYPE_VERSATILE_PCI_HOST to TYPE_PCI_VPB_HOST versatile: Rename TYPE_VERSATILE_PCI to TYPE_PCI_VPB virtio-console: Rename TYPE_VIRTIO_CONSOLE_SERIAL_PORT to TYPE_VIRTIO_CONSOLE ahci: Rename ICH_AHCI to ICH9_AHCI net/can: Rename TYPE_CAN_CPI constants can: Rename KVASER_PCI_DEV to KVASER_PCI can: Rename MIOe3680_PCI_DEV to MIOE3680_PCI can: Rename PCM3680i_PCI_DEV to PCM3680_PCI ccid-card-emulated: Rename EMULATED_CCID_CARD to EMULATED_CCID ccid-card-passthru: Rename PASSTHRU_CCID_CARD to CCID_PASSTHRU esp: Rename ESP_STATE to ESP filter-rewriter: Rename FILTER_COLO_REWRITER to FILTER_REWRITER lance: Rename SYSBUS_PCNET to LANCE lasi_i82596: Rename SYSBUS_I82596 to LASI_82596 pvpanic: Rename ISA_PVPANIC_DEVICE to PVPANIC renesas: Rename RCMT to RENESAS_CMT renesas: Rename RSCI to RENESAS_SCI renesas: Rename RTMR to RENESAS_TMR rs6000_mc: Rename RS6000MC_DEVICE to RS6000MC sabre: Rename SABRE_DEVICE to SABRE stm32f205: Rename STM32F2XXTIMER to STM32F2XX_TIMER tpm_crb: Rename CRB to TPM_CRB tpm_spapr: Rename VIO_SPAPR_VTPM to TPM_SPAPR usb: Rename USB_REDIRECT to USB_REDIR usb: Rename USB_SERIAL_DEV to USB_SERIAL usb: Rename USB_STORAGE_DEV to USB_STORAGE vfio: Rename PCI_VFIO to VFIO_PCI vmxnet3: Rename VMXNET3_DEVICE* to VMXNET3* xen: Rename XENBACKEND_DEVICE to XENBACKEND hvf: Rename HVF_STATE to HVF_ACCEL kvm: Rename KVM_STATE to KVM_ACCEL tcg: Rename TCG_STATE to TCG_ACCEL tests: Rename TYPE_DUMMY to TYPE_DUMMY_OBJECT tests: Rename DYNAMIC_TYPE to DYNAMIC_PROPS tests: Rename STATIC_TYPE to STATIC_PROPS chardev/chardev-internal.h | 4 ++-- hw/rdma/vmw/pvrdma.h | 4 ++-- hw/scsi/mptsas.h | 4 ++-- hw/vfio/pci.h | 2 +- include/chardev/char-fd.h | 4 ++-- include/chardev/char-win-stdio.h | 2 +- include/chardev/char-win.h | 4 ++-- include/chardev/char.h | 30 ++++++++++++++--------------- include/chardev/spice.h | 8 ++++---- include/hw/acpi/vmgenid.h | 6 +++--- include/hw/char/renesas_sci.h | 2 +- include/hw/display/ramfb.h | 2 +- include/hw/ide/ahci.h | 2 +- include/hw/isa/pc87312.h | 4 ++-- include/hw/misc/vmcoreinfo.h | 6 +++--- include/hw/net/lance.h | 2 +- include/hw/net/lasi_82596.h | 2 +- include/hw/pci-host/gpex.h | 2 +- include/hw/pci-host/sabre.h | 2 +- include/hw/s390x/ap-device.h | 4 ++-- include/hw/scsi/esp.h | 2 +- include/hw/timer/i8254.h | 4 ++-- include/hw/timer/renesas_cmt.h | 2 +- include/hw/timer/renesas_tmr.h | 6 +++--- include/hw/timer/stm32f2xx_timer.h | 2 +- include/hw/xen/xen-legacy-backend.h | 2 +- include/sysemu/hvf.h | 2 +- include/sysemu/kvm.h | 2 +- accel/kvm/kvm-all.c | 18 ++++++++--------- accel/tcg/tcg-all.c | 14 +++++++------- chardev/baum.c | 6 +++--- chardev/char-console.c | 4 ++-- chardev/char-fd.c | 2 +- chardev/char-file.c | 6 +++--- chardev/char-mux.c | 2 +- chardev/char-null.c | 2 +- chardev/char-parallel.c | 4 ++-- chardev/char-pipe.c | 6 +++--- chardev/char-pty.c | 4 ++-- chardev/char-ringbuf.c | 8 ++++---- chardev/char-serial.c | 6 +++--- chardev/char-socket.c | 4 ++-- chardev/char-stdio.c | 6 +++--- chardev/char-udp.c | 4 ++-- chardev/char-win-stdio.c | 4 ++-- chardev/char-win.c | 2 +- chardev/char.c | 2 +- chardev/msmouse.c | 6 +++--- chardev/spice.c | 10 +++++----- chardev/testdev.c | 6 +++--- chardev/wctablet.c | 6 +++--- gdbstub.c | 6 +++--- hw/acpi/vmgenid.c | 6 +++--- hw/arm/sysbus-fdt.c | 2 +- hw/arm/virt.c | 2 +- hw/audio/intel-hda.c | 10 +++++----- hw/char/etraxfs_ser.c | 6 +++--- hw/char/renesas_sci.c | 18 ++++++++--------- hw/char/virtio-console.c | 8 ++++---- hw/display/ramfb-standalone.c | 4 ++-- hw/display/vhost-user-gpu.c | 2 +- hw/dma/sparc32_dma.c | 2 +- hw/i386/kvm/i8259.c | 10 +++++----- hw/i386/pc_piix.c | 2 +- hw/i386/pc_q35.c | 2 +- hw/ide/ahci.c | 4 ++-- hw/ide/ich.c | 8 ++++---- hw/intc/i8259.c | 10 +++++----- hw/isa/pc87312.c | 2 +- hw/m68k/q800.c | 2 +- hw/mips/boston.c | 8 ++++---- hw/mips/jazz.c | 2 +- hw/misc/edu.c | 6 +++--- hw/misc/pvpanic.c | 6 +++--- hw/misc/vmcoreinfo.c | 6 +++--- hw/net/can/can_kvaser_pci.c | 16 +++++++-------- hw/net/can/can_mioe3680_pci.c | 16 +++++++-------- hw/net/can/can_pcm3680_pci.c | 16 +++++++-------- hw/net/lance.c | 6 +++--- hw/net/lasi_i82596.c | 8 ++++---- hw/net/vmxnet3.c | 6 +++--- hw/pci-bridge/pci_expander_bridge.c | 12 ++++++------ hw/pci-host/sabre.c | 8 ++++---- hw/pci-host/versatile.c | 16 +++++++-------- hw/ppc/rs6000_mc.c | 4 ++-- hw/rdma/vmw/pvrdma_main.c | 2 +- hw/rx/rx62n.c | 2 +- hw/s390x/ap-device.c | 2 +- hw/scsi/esp-pci.c | 14 +++++++------- hw/scsi/esp.c | 6 +++--- hw/scsi/mptsas.c | 2 +- hw/sparc/sun4m.c | 10 +++++----- hw/sparc64/sun4u.c | 10 +++++----- hw/timer/etraxfs_timer.c | 6 +++--- hw/timer/i8254.c | 4 ++-- hw/timer/renesas_cmt.c | 4 ++-- hw/timer/renesas_tmr.c | 6 +++--- hw/timer/stm32f2xx_timer.c | 6 +++--- hw/tpm/tpm_crb.c | 14 +++++++------- hw/tpm/tpm_spapr.c | 14 +++++++------- hw/usb/ccid-card-emulated.c | 10 +++++----- hw/usb/ccid-card-passthru.c | 8 ++++---- hw/usb/dev-serial.c | 4 ++-- hw/usb/dev-smartcard-reader.c | 8 ++++---- hw/usb/dev-storage.c | 12 ++++++------ hw/usb/redirect.c | 22 ++++++++++----------- hw/usb/tusb6010.c | 6 +++--- hw/vfio/ap.c | 10 +++++----- hw/vfio/pci.c | 22 ++++++++++----------- net/filter-rewriter.c | 18 ++++++++--------- target/arm/kvm.c | 2 +- target/i386/kvm.c | 2 +- target/mips/kvm.c | 2 +- target/ppc/kvm.c | 4 ++-- tests/check-qom-proplist.c | 30 ++++++++++++++--------------- tests/test-char.c | 4 ++-- tests/test-io-task.c | 14 +++++++------- tests/test-qdev-global-props.c | 16 +++++++-------- ui/console.c | 8 ++++---- ui/gtk.c | 6 +++--- ui/spice-app.c | 10 +++++----- 121 files changed, 406 insertions(+), 406 deletions(-) -- 2.26.2 Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Acked-by: Cornelia Huck Acked-by: Anthony PERARD Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé