From patchwork Tue Jan 17 19:30:14 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: 643405 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp1352672pvb; Tue, 17 Jan 2023 11:31:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXsoglKh/1bCRSGQmKtW9TuJur1faUFDJoOD4ZQYAO4e8ON8CP5gF8Vnd5VWZtKCGmwxYhlU X-Received: by 2002:ac8:6ec2:0:b0:3af:ba3b:db80 with SMTP id f2-20020ac86ec2000000b003afba3bdb80mr4690835qtv.33.1673983860468; Tue, 17 Jan 2023 11:31:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673983860; cv=none; d=google.com; s=arc-20160816; b=YbAXuNkugoxEsagfngRGNmRZMl5fIvlNdH5AfkkOElrHqn3Fmp9j+ShaVYyjkYJjz8 O4X21ehXftOA7q/+3seqYzAD2e+o+ZGhF8FzmNC5AJIQ2xQitROTHy5hOWo24w12Hon4 OZ/PPguanGuz16G+8TkKX+YdZPkp7GDAWteevnm3rBSUtnMgnm1d8P6x4vJpL6noldeC EQCKISkQdl4tPXoTSdeWM4wyTJq9gAK0qP9cNVENyqilfo5FRrBzU4CXTFR8aST5Tqv6 hHlCLJqkBCjLm2ji/hd+SOVZsmeGJ+ABCmYZWt/OHJ1/shSeN7WGhMZD7cpkMX7wFte0 qMlw== 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=l7/Pf3QFy7tCNP1T2A2CbqV1qRDD69xfRcKghv8dT2E=; b=opSre6UyMwxxqR0BUUQa/EK/rTfJMHRAoOst5blUGH3uPbwlUFOhOnVbao0YNe47Gn kegTg+xQy2DJQWTnrRp6yykfrDUqsyhOwME58D3QCmBwBwd/xOV58e0QQdlUiv4Vi1OA MLYV7cacXW/Iek3NF1Vi6oLY2k+XT4EY2rgqTTTTvYI9RQadkmgARIa6i+ZD0k3ahL+P cTWvYlVgI8EF3ibsQTZq8YgUpiVVJSGdEMPW8Tt9HJOWmY8qelkXSHmsjT8VqkOcho08 viz3f4brkl2ZZBM6NbhdrubsiWdUuim6dLWFDgT8usqxA135Wc98HavvLe879sw/GbHi RHlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B4cgeNkL; 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 f19-20020ac84713000000b003b464d181e7si5827016qtp.1.2023.01.17.11.31.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jan 2023 11:31:00 -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=B4cgeNkL; 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 1pHrf5-0002J5-PY; Tue, 17 Jan 2023 14:30:23 -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 1pHrf3-0002IX-Rv for qemu-devel@nongnu.org; Tue, 17 Jan 2023 14:30:21 -0500 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pHrf2-0007vx-50 for qemu-devel@nongnu.org; Tue, 17 Jan 2023 14:30:21 -0500 Received: by mail-ej1-x629.google.com with SMTP id az20so58711168ejc.1 for ; Tue, 17 Jan 2023 11:30:19 -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=l7/Pf3QFy7tCNP1T2A2CbqV1qRDD69xfRcKghv8dT2E=; b=B4cgeNkLMnxoXm6wGLj82xnvRcoJ7RK6qZZ9lfNNEI3Zbpp5QhksaHfSrqzNJmaQin x6sioJHeRR9TwkeZluIUlX0Gd4OQV2ijDzbRe3zKFz8AMTTYLwMh+HGFhvc+rC9aE4Wk d6h1rLkS2s+ikTdV3z5tS3b6SAZ6kCc5ZqDMOcHTa3Lt7yETZ4dNfi9oN7yoRwSyO8PI ffSrsf+XXUfDuMSzc1leB2VhNK3IOdH9AD83RDgVSVMgdXJzseFnTiLeHnQTuig/32kc u0IgBYLwOXnGCQETkstFpO1qVeEUmQ/2KD7w3Qv6Zruh3sFTjxRj7LNgvixOBFzna67i xcXA== 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=l7/Pf3QFy7tCNP1T2A2CbqV1qRDD69xfRcKghv8dT2E=; b=WxjXCVhVsh1R8vWuC70tI+6QSi1s/lC+wCcreimKYBTUH6Ik+mnCtbmkgW0bF+KHRW jNcFdjBh8xrN7gpfNXTfbqwYMvjuQYJCtvIaEWSXf5GUColkD54FevjzixsZWJSDbbWL RHiKG7mfMoGteCyCplCelGXvhRhRo2d75FhI+jLQGabDCKXAyngzxZfNEpcs625LkvHS /W4lFSC7xy64b+0Xw1nRFKqmZoS8wQ1/RgOoI+dDIjlTGjduCvewdco3b8do++t23N9M +2mU44+ncTtXE4osiyxdsK2dNjuTtnzW+xRMNIXhmNUTANI2bn64IL6+z6ZbZ7LY3Xxa pflg== X-Gm-Message-State: AFqh2kq9aSHc9VhO2ILGngKY0MEM53cNhTcqKTscyL+ptx23EAd3wPn5 m8YaBqc4Y5I9jFrYZf3jzIWAp69lIAit4ruo X-Received: by 2002:a17:906:e2cd:b0:870:2aa7:6509 with SMTP id gr13-20020a170906e2cd00b008702aa76509mr4329544ejb.43.1673983818290; Tue, 17 Jan 2023 11:30:18 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id ia2-20020a170907a06200b00868c5005e13sm6323824ejc.98.2023.01.17.11.30.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 17 Jan 2023 11:30:17 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eric Auger , "Michael S. Tsirkin" , qemu-trivial@nongnu.org, qemu-arm@nongnu.org, Marcel Apfelbaum , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH] hw: Use TYPE_PCI_BUS definition where appropriate Date: Tue, 17 Jan 2023 20:30:14 +0100 Message-Id: <20230117193014.83502-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::629; envelope-from=philmd@linaro.org; helo=mail-ej1-x629.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 Use the proper QOM type definition instead of magic string. This also helps during eventual refactor while using git-grep. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger --- hw/arm/smmu-common.c | 3 ++- hw/virtio/virtio-iommu.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c index 54186f31cb..733c964778 100644 --- a/hw/arm/smmu-common.c +++ b/hw/arm/smmu-common.c @@ -535,7 +535,8 @@ static void smmu_base_reset_hold(Object *obj) static Property smmu_dev_properties[] = { DEFINE_PROP_UINT8("bus_num", SMMUState, bus_num, 0), - DEFINE_PROP_LINK("primary-bus", SMMUState, primary_bus, "PCI", PCIBus *), + DEFINE_PROP_LINK("primary-bus", SMMUState, primary_bus, + TYPE_PCI_BUS, PCIBus *), DEFINE_PROP_END_OF_LIST(), }; diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c index 23c470977e..1cd258135d 100644 --- a/hw/virtio/virtio-iommu.c +++ b/hw/virtio/virtio-iommu.c @@ -1366,7 +1366,8 @@ static const VMStateDescription vmstate_virtio_iommu = { }; static Property virtio_iommu_properties[] = { - DEFINE_PROP_LINK("primary-bus", VirtIOIOMMU, primary_bus, "PCI", PCIBus *), + DEFINE_PROP_LINK("primary-bus", VirtIOIOMMU, primary_bus, + TYPE_PCI_BUS, PCIBus *), DEFINE_PROP_BOOL("boot-bypass", VirtIOIOMMU, boot_bypass, true), DEFINE_PROP_END_OF_LIST(), };