From patchwork Fri Oct 20 10:54:44 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: 736226 Delivered-To: patch@linaro.org Received: by 2002:adf:dd81:0:b0:32d:baff:b0ca with SMTP id x1csp232149wrl; Fri, 20 Oct 2023 03:55:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGtk7tvKuPqdWTXd0Js1ZTQ6SdwcJOJRlDrcwrPFYTCHJWrtZfdWo9ptmmmG4kVM47o0O17 X-Received: by 2002:a05:620a:394c:b0:76f:456:38fb with SMTP id qs12-20020a05620a394c00b0076f045638fbmr1449720qkn.31.1697799353344; Fri, 20 Oct 2023 03:55:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697799353; cv=none; d=google.com; s=arc-20160816; b=rAbMBtaMw8QmhkfjnLLBLcV7fJYDZ4advDEhOCChsU3ZO9bJ0L4OEKJr3HX/BGCJUm ZtHAPlOaymaYjRqQLVq1UCz6ip9RiUvD93VNaUkr48Tz9SRb8diGge0JqGUCXx9ydK6X BBe4ExHlICsJtI7xUHORnyYGcQisKDAGOCzAJUQoikwiYRquB6TbK/vvEt4ZoEupMMts q8SSvCesxWJD3wMmlZcEFcSv7g+vT1OWpse4rjJ+wLVlFDYIm0/HgY2p9jfwSV2Ocsri MMhbmpWqmKSdrwO+6Bh1lI96V2BJNOvN8cqTUIKiKxZPq4cKhougI59/brZZi18S8lJZ zkIQ== 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=maNUiJX2EIXBBVU6tPTB8OzF/SPwSGfPTsnOI6AFUoE=; fh=W6K7qkqhkLTCsYDgFribxHimDLhEVXbTltVOa+Pdw1s=; b=TfpcvRJZnrQvS2VQ0RnNG+JIXIjg4qg+nmtNdf0o0anABiDeaMeSSyS14tQemu054t Juoq8avAzoWIzWRCdMTZdPw8CYlyf1ltAPTTEtEZo47otDcCGeOWDSH7Ahbrn3FXRgGp nDZBZ8NEpc9r6CRmigfY9mziqgnuHvEsnoL3ymTg0ecR789FrrAB4QKoBDxyKeOfUrXq oqZj18KUndytYa7CjBy28Kf2mBTLw2avfp0KJLtcx2+whrNLViRO6UT8X8UDOGn9U29/ jl9H53wN88/6mg6ZfOhhCIaCBMf51nefynVAZxKaHbRqlQTUwGGTMANFZ/msNmL57B+N ZUbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BxuziZJi; 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 f7-20020a05620a12e700b00767e5d15d79si1103682qkl.34.2023.10.20.03.55.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Oct 2023 03:55:53 -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=BxuziZJi; 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 1qtnA9-0006Q0-9E; Fri, 20 Oct 2023 06:55:30 -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 1qtn9s-0006NQ-6W for qemu-devel@nongnu.org; Fri, 20 Oct 2023 06:55:12 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtn9q-0005Hs-7x for qemu-devel@nongnu.org; Fri, 20 Oct 2023 06:55:11 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40839652b97so5227025e9.3 for ; Fri, 20 Oct 2023 03:55:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697799308; x=1698404108; darn=nongnu.org; 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=maNUiJX2EIXBBVU6tPTB8OzF/SPwSGfPTsnOI6AFUoE=; b=BxuziZJiJAsqzzJ7sC7dSdsLTIGrWPK2smHvS0lCutmqk0Unuh/QcJmWi1S5H3k5i1 T9Ia/Ja6ctDEc0iQ45ID/9BYDIamVtMM55gVtWHClSnSsKRaKDX9KZor+j5VComuYiax uN8CHU5XIBeNjuUWSC7kgO1hTO4yFwzNlr/WG5f6EUWTnlzEh0qbkXaC5Y4hXqNa3leh yoPW4ipDVxiSDzBhxPxWOnWqmWCls9pAjAJ1RJbRF47nGByJaNxbY5iqqfyF+CK/h2mg lREtwBmYsm9aBJwYtTr1mNYWR44WFZEIDcgMXFmvXYC+Hommskk8PJ/Oj/J3YQ+p9QNi 1YWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697799308; x=1698404108; 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=maNUiJX2EIXBBVU6tPTB8OzF/SPwSGfPTsnOI6AFUoE=; b=qA/NEhrSthckZ7YyO1A0Fq/Db/3HCWnGGl4h0yaTLxv4Svnu+igmDNK/oOEs63G1g9 5m93jxlu/p2HlmACWbbCpxlpdBzhV+12YZSlKbBG+U8g4b4nE0FfBztCURuFu52nYAMw BV33uk2oBreZM1nwwo/qivDGgE0zaUxVbY5Oakw/CSHN8ZY+e2s/DnJclQnMoNi1Ec5C AglKUcphVpazXm7lFOXHmSHKB23kW+Uq2sRlJOOxX4RnXMM5KWX+GLWx6fXFCekMlyYd jLTPIdmOJfcDQrHXvmYuq3DcEkkdVFVEh57AbxZqIGSv7UP4ulHAsV7yrsU6kh7q3oxt cpgg== X-Gm-Message-State: AOJu0YzGsRvoxnsuiwQ47tSXgOZVTOOwjfhP9Dog7rnH0tsa4Kf95dSV JfYZdh4f8kaGjM0KuBAkfWx/o7NoNQoQB8BXSbI= X-Received: by 2002:a05:600c:1992:b0:406:872d:7725 with SMTP id t18-20020a05600c199200b00406872d7725mr1223870wmq.1.1697799308184; Fri, 20 Oct 2023 03:55:08 -0700 (PDT) Received: from m1x-phil.lan (tbo33-h01-176-171-212-97.dsl.sta.abo.bbox.fr. [176.171.212.97]) by smtp.gmail.com with ESMTPSA id k17-20020a5d66d1000000b00327cd5e5ac1sm1446378wrw.1.2023.10.20.03.55.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 20 Oct 2023 03:55:07 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Bernhard Beschow , Markus Armbruster , qemu-ppc@nongnu.org, =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= , Mark Cave-Ayland , "Michael S. Tsirkin" , Marcel Apfelbaum , Paolo Bonzini , Richard Henderson , Eduardo Habkost Subject: [PATCH v3 3/5] hw/i386/pc: Inline legacy pcspk_init() in pc_basic_device_init() Date: Fri, 20 Oct 2023 12:54:44 +0200 Message-ID: <20231020105447.43482-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231020105447.43482-1-philmd@linaro.org> References: <20231020105447.43482-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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 Reviewed-by: Mark Cave-Ayland Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index c58a15182e..3937d88355 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1286,7 +1286,11 @@ bool pc_basic_device_init(struct PCMachineState *pcms, /* connect PIT to output control line of the HPET */ qdev_connect_gpio_out(hpet, 0, qdev_get_gpio_in(DEVICE(pit), 0)); } - pcspk_init(pcms->pcspk, isa_bus, pit); + object_property_set_link(OBJECT(pcms->pcspk), "pit", + OBJECT(pit), &error_fatal); + if (!isa_realize_and_unref(pcms->pcspk, isa_bus, errp)) { + return false; + } } /* Super I/O */