From patchwork Tue May 23 06:12:03 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: 684882 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1548907wrt; Mon, 22 May 2023 23:13:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6LEEkWzFt/IYkzClZWsnyNaITQZQNafvXU9FOzswDfnnOpusBtw6EEs4t0eGQClIsyOPVN X-Received: by 2002:a05:620a:4147:b0:75b:2572:7aa with SMTP id k7-20020a05620a414700b0075b257207aamr3228730qko.40.1684822382937; Mon, 22 May 2023 23:13:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684822382; cv=none; d=google.com; s=arc-20160816; b=sv5zbxqPS5Khsc+u7N57MnsW5xhCbmnDTH+q6rJc0kO5cZvKcGH5qsfiMaV/Q+ktwV lBdFbeNzvzhptAP9olPBqi2HgtiagSRRaMILc2WrHmuOBJSRk/xcfihAiOAymoCCRzRY bziQmB1STxNYZZN8V+Va+B078qyAbia+hcMhq2lSEapUC9w4+8f20liBk9tAm+Ek8TqY VV1Ryre9Qw7ywPIwdIaQmMBRCH/+SEq0M6jX3qT7fNNbioRp3i1ZrxviDyKIiBlUxGA0 ffgUBo4Gs/jI993jO05hW8PlOVJoNHZXtyJexqe280IVv24BuBeFYCZ/vWBzpzbRq3Hj UuVg== 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=dVduBQdrAQ/JitmbuXJOwhpd3wkRFgWVzK14sta4Hho=; b=jdVQdR5OKqt4S82UlA2E7Ez+bxZvtuSuIAuksOQsBkc1mu9ikSjuQcGn2SqiO5V2Wr XjRqRvt/7MDm/DhA+8/hnNrJ+DLFAMNePb/L8KtAABbTwtHqz1cYhHE4G/4WKQVjFfst NaraZP/oCfACswqUHkoxrk3MiB7caicvqhpbGKdJ/mNwHRD7ECtgSef8+6U2h+paB39A T3MZ/D3sI3pzWwwm0GLgDOKNsm8R3NdOIKEGKaAu5+huIe5G+SfNfNrWBnoNTx2UOsVU jgJYmtDU6F931Ukt5njS344fZWysIauRl2+OwoMrzS3f8PECyUEEdnOo+Jt7Y+FntCFa NVcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vCePpB1t; 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 s7-20020a05620a030700b0075b13a89c28si2514055qkm.664.2023.05.22.23.13.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 May 2023 23:13:02 -0700 (PDT) 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=vCePpB1t; 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 1q1LFv-0008VU-Ee; Tue, 23 May 2023 02:12:28 -0400 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 1q1LFl-0008SP-Rw for qemu-devel@nongnu.org; Tue, 23 May 2023 02:12:14 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1LFk-0005Fg-E9 for qemu-devel@nongnu.org; Tue, 23 May 2023 02:12:13 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3f41d087a84so30990285e9.1 for ; Mon, 22 May 2023 23:12:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684822330; x=1687414330; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=dVduBQdrAQ/JitmbuXJOwhpd3wkRFgWVzK14sta4Hho=; b=vCePpB1tAOUKUDaavDFVn3RTGCYQA7+ia8SH5XeZXmCUbdkl6Pc//7WTUCT3CmJmXs 7ARwdmqLBetrfYsaHz6zCcc+OCTVaN/U1crtM1KYPkTTa4cUVY47Sw2ueYAQRooVTV54 wqUs7uVdM1CFGDnTV7VGzrD3xZA1fiH3gfzH6ikMEUE5Q2Clon1nSVSuH1p8HUwvOnp1 nwxhMJlgdAj6Ga31jPH3/4uSxGX202lbQmNhR9fjKzQRUSnip0VUGTkyfam2b22c9wKj twXR3bBKjZyJlo7xtfa8frQPjD9pZNCfADZBm8ipbVioBDWF48eigM2ZTk9T3SVtpWyW K1NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684822330; x=1687414330; 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=dVduBQdrAQ/JitmbuXJOwhpd3wkRFgWVzK14sta4Hho=; b=BfhEp9xmx6o5W3sdRmpPGPcMvXpB3UrziD5A2KdUfqB5velwkfKsbCw8kMglO3/Emo 1EFDcl17qwP7v1QS77JY8WxwOqo/qW7KX0THmNLyR4hRt5lYbztULSSCeaRUQrO6S8/f bhhT5CMD/WbeIpiroMjWsWWoYBsjSy8cjWbet0n2OYbR3xEWAjAhjjCAdpAmaNuMnlrp iLe6YXVS3aiNPh9t56XtHXlSxpFgYRMnF0e+FBsI0+yJnD/XB59otb+zfmOUapV8q28f FKojncCbHe2aeKC4a25eHjO7vKw1FOMbkeMUkbR8hO8SQvuvZus3tBTaXKgzemirj+xc URww== X-Gm-Message-State: AC+VfDyOrBwvC1sZLwwR40LSGy7fGO/bz3yt9CU6HhgBelIfF55fagJF J/A+PxkSdhfqi2fn33Qkc9Nk/9iJblbgxHBKjtg= X-Received: by 2002:a05:600c:2256:b0:3f1:7848:6740 with SMTP id a22-20020a05600c225600b003f178486740mr9184172wmm.8.1684822330351; Mon, 22 May 2023 23:12:10 -0700 (PDT) Received: from localhost.localdomain (vil69-h02-176-184-48-94.dsl.sta.abo.bbox.fr. [176.184.48.94]) by smtp.gmail.com with ESMTPSA id h19-20020a05600c28d300b003f427cba193sm13674971wmd.41.2023.05.22.23.12.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 22 May 2023 23:12:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Sergio Lopez , "Michael S. Tsirkin" , Eduardo Habkost , qemu-trivial@nongnu.org, Richard Henderson , Gerd Hoffmann , Marcel Apfelbaum , =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= Subject: [PATCH 0/4] hw: Minor simplifications using proper QOM getter macros Date: Tue, 23 May 2023 08:12:03 +0200 Message-Id: <20230523061207.48818-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::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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, T_SCC_BODY_TEXT_LINE=-0.01 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 Enforce QOM style. Besides, using the proper QOM macros slightly simplifies the code. Philippe Mathieu-Daudé (4): hw/core/cpu: Simplify realize() using MACHINE_GET_CLASS() macro hw/i386/microvm: Simplify using object_dynamic_cast() hw/pci/pci: Simplify pci_bar_address() using MACHINE_GET_CLASS() macro hw/usb/hcd-ehci-pci: Simplify using DEVICE_GET_CLASS() macro hw/core/cpu-common.c | 3 +-- hw/i386/microvm.c | 3 +-- hw/pci/pci.c | 4 +--- hw/usb/hcd-ehci-pci.c | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) Reviewed-by: Michael S. Tsirkin