From patchwork Sun Feb 12 22:51:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 652832 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp2124192wrr; Sun, 12 Feb 2023 14:52:17 -0800 (PST) X-Google-Smtp-Source: AK7set9+3bha9RJFY9fRan4pi7P/i1jGhNREeVOT99WRMsPM/ktoJgqiR0hGP+UKTHFrUIPCYpLN X-Received: by 2002:a05:6214:5016:b0:56e:9c74:74b7 with SMTP id jo22-20020a056214501600b0056e9c7474b7mr10166035qvb.23.1676242336911; Sun, 12 Feb 2023 14:52:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676242336; cv=none; d=google.com; s=arc-20160816; b=hyWCS+OcOazcbD4yETK107h/JLXnknzopAGjadP9jxORuEORMKJ5JErdx2gs4Zo/TI GhLjQjSWJ2w8iHa2cr734vT4yZJvtubjwen3nLjvoXImfzUII0FYuEErccl02czTXWmn irXBwPBfgvuTek1nIxLxQlXkPE+BopO6m+CDd718/PndMkMsBYt4AIhSGtIeMhh2FxdF g7FRxrs0M22YErz8gXJh+v0QxaWgIxqQ69SZytZ4H1eD6tJPBT4SzyO44DFj7HW0FQP7 PihAO22/6n1D2G+aR5uagJ+3RjSzEGCS9Qv4rVAuX5ROS09tHe1oSqdELiNw/AobBwb+ wz8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=kaO4XdYgX6Zo2q6n31eDlmjKIxTWt2PU37HruYCGlzo=; b=VXfLeBXZcK8WuafWI0PMpzzyLWymWuzx30jLHsUk9ETAl/ZKBs/u3m/ePLZs/LgZX8 jyFx39zKhH2vfP84FBunTTyLjsRDWBUEaxOuZBLh2Wrh+UQCw5NeCuPUCttcHejrDsZN +733AutwyydgQHx+zo3q5gV/wJY9Vuad06xnnUjvU/mX6ugOR0HLNcwdxV6xJI7dscaj 82WTnb4fY0/A1+wmtOJD9T/2flLKJS4dXlJbb2edFO963WevC87XEAk/uCDnuqYQVUp2 u+DMjNg9+LsMg1kjjUWKyWT9grUZqftqffidjTtdl25e5uR69MXJ0zBCGNiP9Y4I9GLs 6UlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eAdYJNZl; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k19-20020a0cf593000000b0056ea39b7a0csi2954236qvm.235.2023.02.12.14.52.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Feb 2023 14:52:16 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eAdYJNZl; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRLCJ-00056j-FS; Sun, 12 Feb 2023 17:51:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRLCI-00056Q-FE for qemu-devel@nongnu.org; Sun, 12 Feb 2023 17:51:50 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRLCG-0003sU-OY for qemu-devel@nongnu.org; Sun, 12 Feb 2023 17:51:50 -0500 Received: by mail-wm1-x335.google.com with SMTP id l21-20020a05600c1d1500b003dfe462b7e4so7687347wms.0 for ; Sun, 12 Feb 2023 14:51:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=kaO4XdYgX6Zo2q6n31eDlmjKIxTWt2PU37HruYCGlzo=; b=eAdYJNZln/ndBEo+VYULHxRBXAhEWnpd0Y+84JrfUmd523/pEX0YHTDWgNzavJU55J ZN3ttLu07O4h1NN6v+bBjED/9KtQfvA9hhDDGrmGDLJb9eSVmv4MAByqA4FK6hIpFRKi BQFclsA0K3qPn5AO/uLI68gRfmuW/eVPnLfUyIAW5Q8eYIVR7J1s6wdvG6ozdstp8w/Z h8GKyTn7PWAsEVW5B3wRyEbexESIjXHtDiX/TcUriu1d9bSj6nQmsSrxMEZaSz/UMFyN vH4SLH/+hmyM8EJkoFzjibL2aJpKweEJ0YxzvvrQTK7ppKoVmCaTPoA5xRiLY7fmZR5K FLRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kaO4XdYgX6Zo2q6n31eDlmjKIxTWt2PU37HruYCGlzo=; b=2nQ/mEkeER+6s83KJ99PI0wC2ENBKmOJe7gTz9mYAAYR0/zZYoV3BeBVfxP/dQT2ai au/0GbsJ4pOXX+KyHDBpMkcSuLlVxQLkcETCLXbbwJG/NhbSQ6pVSK/PJTMd7GYaAa/+ TPQr1+qaNFH8A/IvImwohmtUpeh8mtyUJw6Hlw0LQx+l2t9vvK6retcqRf/a+vJtbwbs osNf3OjbzraPVvIngVtZHdfWpdSlTuPY0TUiUZG3A8QqUvuu08K4Cp7tH0ijBOglKJUb fkSCHjgOXQMKJH6MuOkcJYc+ixEWoUmbs6yEO4TkuQ7Fzfewdtiz/jA1Nn3GP7km3vMy 87ww== X-Gm-Message-State: AO0yUKVAihcmeY+b+X7sphJfZOnA3aoi7PLn7ppGHLl21rdme1ud+O+4 det0xCoVa1D6+9atf6l+Ka0U/g== X-Received: by 2002:a05:600c:1609:b0:3dc:4316:52be with SMTP id m9-20020a05600c160900b003dc431652bemr3139501wmn.10.1676242307271; Sun, 12 Feb 2023 14:51:47 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id p6-20020a05600c468600b003dc36981727sm16612684wmo.14.2023.02.12.14.51.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 12 Feb 2023 14:51:46 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Eduardo Habkost , qemu-devel@nongnu.org Cc: Richard Henderson , xiaoqiang zhao , Hu Tao , Thomas Huth , qemu-block@nongnu.org, qemu-s390x@nongnu.org, Gonglei Arei , Cao jin , Li Qiang , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 00/19] hw: Use QOM macros and remove DO_UPCAST() uses Date: Sun, 12 Feb 2023 23:51:25 +0100 Message-Id: <20230212225144.58660-1-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.com 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org QOM housekeeping series which replace the DO_UPCAST() macro uses by equivalent QOM ones. Also: - Use DEVICE() macro - Define some TYPE_xxx - Define some type arrays using DEFINE_TYPES() macro - Introduce abstract QOM (QDev) parent when relevant. Based-on: <20230212224730.51438-1-philmd@linaro.org> hw/qdev: Housekeeping around qdev_get_parent_bus() Philippe Mathieu-Daudé (19): hw/char/serial-pci: Replace DO_UPCAST(PCISerialState) by PCI_SERIAL() hw/char/serial-pci-multi: Batch register types using DEFINE_TYPES macro hw/char/serial-pci-multi: Introduce PCI_MULTISERIAL QOM abstract parent hw/char/serial-pci-multi: Factor multi_serial_class_initfn() out hw/char/serial-pci-multi: Replace DO_UPCAST() by PCI_MULTISERIAL() hw/ide/qdev: Replace DO_UPCAST(IDEDevice) by IDE_DEVICE() hw/ide/qdev: Replace DO_UPCAST(IDEBus) by IDE_BUS() hw/net/eepro100: Introduce TYPE_EEPRO100 QOM abstract parent hw/net/eepro100: Replace DO_UPCAST(EEPRO100State) by EEPRO100() hw/net/ne2000-pci: Replace DO_UPCAST(PCINE2000State) by PCI_NE2000() hw/net/tulip: Finish QOM conversion hw/pci/pci: Replace DO_UPCAST(PCIBus) by PCI_BUS() hw/scsi/scsi-bus: Replace DO_UPCAST(SCSIBus) by SCSI_BUS() hw/scsi/scsi-bus: Inline two uses of scsi_bus_from_device() hw/s390x/event-facility: Replace DO_UPCAST(SCLPEvent) by SCLP_EVENT() hw/vfio/ccw: Replace DO_UPCAST(VFIOCCWDevice) by VFIO_CCW() hw/usb/dev-hub: Use QOM USB_HUB() macro instead of casting hw/usb: Replace DO_UPCAST(USBBus) by USB_BUS() hw/usb: Inline usb_bus_from_device() hw/char/serial-pci-multi.c | 93 +++++++++++++++++++------------------- hw/char/serial-pci.c | 7 ++- hw/ide/qdev.c | 10 ++-- hw/net/eepro100.c | 46 ++++++++++++------- hw/net/ne2000-pci.c | 18 +++++--- hw/net/tulip.c | 20 ++++---- hw/pci/pci.c | 2 +- hw/s390x/event-facility.c | 3 +- hw/s390x/ipl.c | 7 +-- hw/scsi/scsi-bus.c | 14 +++--- hw/usb/bus.c | 10 ++-- hw/usb/core.c | 6 +-- hw/usb/dev-hub.c | 10 ++-- hw/usb/dev-serial.c | 10 ++-- hw/usb/hcd-xhci.c | 2 +- hw/vfio/ccw.c | 35 +++++++------- include/hw/scsi/scsi.h | 5 -- include/hw/usb.h | 5 -- 18 files changed, 155 insertions(+), 148 deletions(-)