From patchwork Mon Feb 13 07:08:01 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: 653170 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp2266101wrr; Sun, 12 Feb 2023 23:08:56 -0800 (PST) X-Google-Smtp-Source: AK7set+tR+THANdxhHiS0l5+vy58ww821mXaft18Ws7Xy2dHxYi4QMsgrUOQvV2nMx1PdfzP4xIf X-Received: by 2002:a05:6214:5293:b0:56e:a6bb:47ae with SMTP id kj19-20020a056214529300b0056ea6bb47aemr8467102qvb.12.1676272136217; Sun, 12 Feb 2023 23:08:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676272136; cv=none; d=google.com; s=arc-20160816; b=idEdYDsyhWGEicxe6giJ+j/wejoq4zlH4OaMSAnGTqoZBzBuYAzyWkSwxMoClTDruC iQimvjhtBIQ2H1nphHJ9CuFTb4AiuDiCFy6A96MDZKDuLs3Xp7J89bk5pXpiWrOf+uie BfmQ2V0e4TO4/HK6YCbnJoD1J0HML9hNyTbLdnTp7vsGpjrvphroZNvYE1E9Bp5f+79R 98LdrPAhvagFjcQgH877UEX7+PJMxfY3wYHw0aSVsZrE77QXky2T+2qwuXDY1ckLPe2x rnv9GUo1P9ej1hxTD70VxD5iaaXBU9hhjMNEhZtBQIgGeHcDMLjLH+zUdSOu1WqCNYmv rPhw== 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=lux5rTS8ete4gNLpWbokw3KelMLn0CF7PB03N10HR70=; b=gqjKSPEdDxCmelRR/h/z47TaECTOXHs6b4wuCz/eo1kbAWlWuWQBFdy5hq1s+dk4U5 fxShk4ERfiYNU3agqG7ZiIA0KOmPERIGrhxHnbR1RMd1vF6JdQt+3N0k0Z6RO0iQyiBg FMGP0py/ArKmhzynEm+TTAHZlkcVIgE7z7LPA056WZZytFg/V9PWwpi8RexsJ6ZwD4vU gv2v8vHF97R9OFURAUFz4Htoqitm7vgIFBxCpUKpcuP9dlYEnIaZHg5Gf6aapdNXNc4c 55re8tX21Pkc5uZVzdL2fEjUzBc9f7MgBtXEvYoFW6aOEHaMUhfKgGV4ezbNV9MRmHbW LoYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FvqA53n3; 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 dt9-20020a05620a478900b006edbffbf44fsi8702577qkb.369.2023.02.12.23.08.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Feb 2023 23:08:56 -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=FvqA53n3; 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 1pRSwt-0000BP-VG; Mon, 13 Feb 2023 02:08:28 -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 1pRSws-0000Ac-ED for qemu-devel@nongnu.org; Mon, 13 Feb 2023 02:08:26 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRSwq-0001jR-01 for qemu-devel@nongnu.org; Mon, 13 Feb 2023 02:08:26 -0500 Received: by mail-wm1-x329.google.com with SMTP id z13so8013938wmp.2 for ; Sun, 12 Feb 2023 23:08:23 -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=lux5rTS8ete4gNLpWbokw3KelMLn0CF7PB03N10HR70=; b=FvqA53n3zkQfr9Jo+aypzx12tCj+waCcNC53O93elgm6I8dMe6Xdhp+vT3D8MoL7VP 4pMzoC1GiUsFj288dr0wn5IwNCJHeTart1whkzGyhur9Y/A0a1wv9fMK7H+2R3Ev3UkR oNBJyVfh00eHvmIGayKWlkkSDHznBg/zLyXFMYxssyPRZREANgs/vygxzO4XiLqHKdzL QOkNuVgssGiVUDkQwZBf7P3J5VWpzLOd4oTLhMiblC61VGFlUQSisXDU/a2ZxTnVpfJG /h/PGUeUN+4NliBm/taLkBzd8eKCr4tcxPqbLdGYwypz+n8Gpqcm01yUbRucF7VCmOBZ VVlA== 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=lux5rTS8ete4gNLpWbokw3KelMLn0CF7PB03N10HR70=; b=j/W34yGPwhCf82Doo4UmvhNh4W8kffuvh6QTK2T3gwwbZP2NNEo753i4xNRtwBmEsb B1K8Rhxvg+Ubp7KqaQkub/8X4eFSVs4Zwu04xKvJHpCGc79s8q4fuhyT9EYNJQehxcCF 3+V5zBSsdUbp444nJJRmbmFf+bjzRWliXz4E4NbmGItMf5+DSK1ptCIu38oPNsKGK8HO NYSmip4aKcmjk5CzfafJDsHNyeUN6TZZg3ixPxs7zwqafFCa+RF2nUMdXAwfvke3ediA 89VOV1A8Q/ZCm+qfHCXNUoumlCEVhpm98ICd3o8Cq5iCkPg3ttQe92Ln1vhEGfUaoCgB 2GvQ== X-Gm-Message-State: AO0yUKVSpV6dOroG/1ipD7PBc+wk6i2x+gHeBysx8SKAeNVFQQdGj0Jz qDCYwHr9thrjlw25/iIwI+R1s3/sEuODHF0C X-Received: by 2002:a05:600c:4d09:b0:3de:db64:a56f with SMTP id u9-20020a05600c4d0900b003dedb64a56fmr22756503wmp.13.1676272102269; Sun, 12 Feb 2023 23:08:22 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id g10-20020a05600c310a00b003e1e8d794e1sm3989019wmo.13.2023.02.12.23.08.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 12 Feb 2023 23:08:21 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Eduardo Habkost Cc: qemu-block@nongnu.org, Thomas Huth , Li Qiang , qemu-s390x@nongnu.org, Hu Tao , Gonglei Arei , Cao jin , xiaoqiang zhao , Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH v2 00/19] hw: Use QOM macros and remove DO_UPCAST() uses Date: Mon, 13 Feb 2023 08:08:01 +0100 Message-Id: <20230213070820.76881-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::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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=unavailable 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 v2: Rebased 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: <20230213070423.76428-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(-)