From patchwork Mon Feb 13 10:56:08 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: 653198 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp2340733wrr; Mon, 13 Feb 2023 02:57:06 -0800 (PST) X-Google-Smtp-Source: AK7set8XIfgTyLdvAs2/FmgT+fU0dyYuhAztS10m+Iw8u5AK87vr0HSqedoikMpU/jbctGzXxKuZ X-Received: by 2002:a05:6214:2a4e:b0:56b:f6c3:11ee with SMTP id jf14-20020a0562142a4e00b0056bf6c311eemr46017416qvb.2.1676285826626; Mon, 13 Feb 2023 02:57:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676285826; cv=none; d=google.com; s=arc-20160816; b=CVXJt9pXFTZE1NR7S2rFLVohTSF1GkCItffXoxUCfIfSQaYnUWeWcLAYfOllo9JZIL 48cF9pOz+4k15LNR6031tUj3GlRtI3WjH386AuXUMH/LR8pkeLQ8NqmTNCgsuQJyyJmI kxjE3CHT6xKtK+KoHAihSRc6GtLmJuJlOd6V2rgDdBxdJqr2GVGFKg3qZJcA3Nx1ob8q IV7d7seyELBRVBt9oqrBnOlJBOdVi9sy9ycG1T/ZpUJUjcOhv/hVAHk0/6gyJs2upkkr XvTmOIcHb324p1EI1or1pqWIXyckg8FOVjUzv2fZs0zfpJUssDFRuORrw7h5Vay7Cgfe qtFw== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uAtLXsDM0eQOunnCiOEWBVbTBBIpljWj1BX7nIfwmRU=; b=IvJobni48oGZAXUKIVhr8Fh0lxj2UQsrZIMf7C7HXFvmR4wJPnwOH+hLIQST+nWD7S 9IMI2A3v1CbE9FCunILMy2XvKFzofh9j2+fM58yerlBSPjE6oUxZRsd36QFIHymxDAg3 lERD6lGiV6yfuvIpiqRX5liv2VlpBLG0KQHl+fz00YyRETs8LaNQxNQbVpNqA6QgIMro HneCkE8qcn1D/axl3xVvfQjVkHw0JaxKoEz3lSoMuzVj8VtMTmRXXYYqELv0Q8iDUUJx 1KZsz0PregqlZCInqygbQ+y+O73/F7a0BNdbHecEr/6gzSU72czy/RdAnmQciq23I73S XGQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="SS/Vznyy"; 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 i20-20020a0cf114000000b005517fd5c54csi7449060qvl.516.2023.02.13.02.57.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 Feb 2023 02:57:06 -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="SS/Vznyy"; 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 1pRWVh-0006iB-Ts; Mon, 13 Feb 2023 05:56:37 -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 1pRWVd-0006cL-R1 for qemu-devel@nongnu.org; Mon, 13 Feb 2023 05:56:33 -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 1pRWVa-0003f6-T4 for qemu-devel@nongnu.org; Mon, 13 Feb 2023 05:56:33 -0500 Received: by mail-wm1-x329.google.com with SMTP id f23-20020a05600c491700b003dff4480a17so8123646wmp.1 for ; Mon, 13 Feb 2023 02:56:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uAtLXsDM0eQOunnCiOEWBVbTBBIpljWj1BX7nIfwmRU=; b=SS/VznyyIjHBEiUz97tGxnbtKdCEXne3mDgS9XIVuN7pzGlhBKTatAsHSzXg/KlhMq CuzjzUyrDmrrz3BGoBTbKb28+wya5v5VWIQza8x3erB5fS8oBK9OwpX4hEwYAX2NDF0X ojCqve8ppauv7ldZikt1psDpu4A/rj5qyDplgDr+T95Ge08/rcbjmWptVbmfiEThmbeO MmWLoW0XTtpf0ng/eSY0TqP537qPJA1JeSH1EO0rYgGntEZkZPRnxWaN0UKnhe+edURp UyOw2/890Jp46cE2TDpWKpPsSn16Gx+zbEAnilYVefAdZEL0AVD6mIG8aET+HNB8HlFP Gc3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uAtLXsDM0eQOunnCiOEWBVbTBBIpljWj1BX7nIfwmRU=; b=xhe/UlovH7xxgUQ9JMXSGjHtDmcr+thQpWWONeTZC/XbwsXZeqn9Flw8I9xKh/zDJh kN47AmHXrH1SzFVh+Wao7c/iG9PFRP1WW11lTB+TUPU+qykqVfegMSQhN9y2GSkb6/Kg tPiMRlutC4b29ySEGjuXnzTvYA2lGVLwEc/6VW12IUo077+8cjjf+LGREeTx9XCr6a/6 60XrtP/nWl6Gu0l3QkKNqJHHqDuB53axoKV1Z28UI+EyFAeNAaBxfvUrMpopwOt8GawK vRAOtrWFXC7bqnnm6uoiSK9PuqIvaxHGcWMOb3z3mE84x7EH56Pp24DfyhBD+F6iDksc 2QoQ== X-Gm-Message-State: AO0yUKUiOqJHUuJwpSqx+Eb/zBhX3afe9Vkq0fVq5+CLutxVYPNsj1Gk 2WOLiOXhk+jhY7wdaldBX3YTP9sogzC4RqCT X-Received: by 2002:a05:600c:2ac8:b0:3c6:e61e:ae71 with SMTP id t8-20020a05600c2ac800b003c6e61eae71mr20812793wme.1.1676285782520; Mon, 13 Feb 2023 02:56:22 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id g10-20020a05600c310a00b003e1e8d794e1sm4701271wmo.13.2023.02.13.02.56.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 13 Feb 2023 02:56:22 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Eduardo Habkost Cc: Peter Maydell , Gerd Hoffmann , "Edgar E . Iglesias" , Igor Mammedov , Samuel Thibault , Paolo Bonzini , Markus Armbruster , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Mark Cave-Ayland , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [RFC PATCH 2/3] hw/usb: Declare QOM macros using QDEV_DECLARE_DEV_BUS_TYPES() Date: Mon, 13 Feb 2023 11:56:08 +0100 Message-Id: <20230213105609.6173-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230213105609.6173-1-philmd@linaro.org> References: <20230213105609.6173-1-philmd@linaro.org> 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=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 Signed-off-by: Philippe Mathieu-Daudé --- include/hw/usb.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/hw/usb.h b/include/hw/usb.h index b2111bb1c7..09f345f5c5 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -266,8 +266,11 @@ struct USBDevice { const USBDescIface *ifaces[USB_MAX_INTERFACES]; }; +#define TYPE_USB_BUS "usb-bus" #define TYPE_USB_DEVICE "usb-device" -OBJECT_DECLARE_TYPE(USBDevice, USBDeviceClass, USB_DEVICE) + +QDEV_DECLARE_DEV_BUS_TYPES(USBDevice, USBDeviceClass, USB_DEVICE, + USBBus, USB_BUS) typedef void (*USBDeviceRealize)(USBDevice *dev, Error **errp); typedef void (*USBDeviceUnrealize)(USBDevice *dev); @@ -473,9 +476,6 @@ void hmp_info_usbhost(Monitor *mon, const QDict *qdict); /* usb-bus.c */ -#define TYPE_USB_BUS "usb-bus" -OBJECT_DECLARE_SIMPLE_TYPE(USBBus, USB_BUS) - struct USBBus { BusState qbus; USBBusOps *ops;