From patchwork Fri Feb 3 18:09:11 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: 650101 Delivered-To: patch@linaro.org Received: by 2002:a17:522:d8c:b0:4be:c3dc:14d8 with SMTP id d12csp972482pva; Fri, 3 Feb 2023 10:12:37 -0800 (PST) X-Google-Smtp-Source: AK7set8FBWpO4GjVfsccqOxxnio68J923lqNHftBNGmDjKFVaM0bOwRllKaY0DzcaYJuKcExSCL9 X-Received: by 2002:ac8:57d6:0:b0:3b8:6cd5:eda with SMTP id w22-20020ac857d6000000b003b86cd50edamr22156334qta.47.1675447957695; Fri, 03 Feb 2023 10:12:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675447957; cv=none; d=google.com; s=arc-20160816; b=xF8UfAndix7TLD8XyW63+G3Y+D5vJh3FS1cSm2UiFa1NnhL8KoWq5NGozHTFHW3Vb4 lYusJLkAD82jWTnK7ulU8itln4edwTLqGYPwruwQlYDYrJRVhcbG9KFZCwYM4o/xT8n+ GqIDqr26V+FVPHMurSxziXwDSianUUyOAgI++HUgR20xQRvzmjk+yNPC+GXW4tuwSFuD H0JCR//hflmvzrD81QtkcySo5PXlGyE1p+UZ6kqDpBOJO7mPiEG1p9HfB/20AcM+IzdL gXTRb5hwYSYB1/grdggRroQUfzJ1Jp1woGdkcSykmWNevVYX8IOA3aBIyCRJnvNOh5bC 5A/g== 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=g8ALrbnz1qXI5HffWq09XMPgoWQJ0GtQQ757vbcP15I=; b=fnV1ny7yHHAJxymqjnchd5AZusb8TpuCNYlH9FlAP+rpbTG/68OKtXxY6us+sHFNgv e4tKcHh0yEW6q/nPlxXTbm2pATcOkXj8EBEXgz7YAAEsHeuFkESHGyvNeXQ0IlDVxj2n GcJqrLWrkA9hW5vKBikzwqJvRnU7Gd8lTZ18I591WBwm3118+xwpW/9YeifWvdDw/ZRa a5+Art1nGv/do1hGMp2ON52t80jr/2wAY5C+YUr94lYSAaHLutjqpYNBOb1WVIoVCVb9 pu6JzuKLkj+HO5R+Bcd036cAe19EV3U6O1v2EFMtQ0tPyhIr1fv5ufGtlXlL9TXPGWe3 rn0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HNjQLyre; 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 e7-20020a37b507000000b0071aa932dacdsi1925968qkf.43.2023.02.03.10.12.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Feb 2023 10:12:37 -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=HNjQLyre; 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 1pO0WL-0002Au-NL; Fri, 03 Feb 2023 13:10:45 -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 1pO0WK-00027k-Of for qemu-devel@nongnu.org; Fri, 03 Feb 2023 13:10:44 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pO0WH-0000hX-Jm for qemu-devel@nongnu.org; Fri, 03 Feb 2023 13:10:44 -0500 Received: by mail-wm1-x32c.google.com with SMTP id j32-20020a05600c1c2000b003dc4fd6e61dso6581945wms.5 for ; Fri, 03 Feb 2023 10:10:41 -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=g8ALrbnz1qXI5HffWq09XMPgoWQJ0GtQQ757vbcP15I=; b=HNjQLyreQEHxmL4W5YYy8YHCmF9c03nB90ylx3Gfz/8BOXXhldHAP1r5R++XmzSCNl rFWWJv66Vr/SdTWnMscDKkdJ9tbO1E57TdJ+AA7ZNi8Xeg07whxkgN7lx/oLZednUAt7 4yytnpoGSzrqy6a5UBBVj3SDHzmUyWuEkvejlSFB0HZEjbng9Ba6MjHOOvylEHOOWSgA K/b0ntaL861gYFFNwWi8qz9uDJSPe3ibknBqJlsnN+tiCWEY59OKNCYfnu+RAI50FkZT oGBLQi8f0LH/L8re9+heWSbcjX1jF3Sc5cqmoBUEE56NOafMiGzr3LQ4q+EIEA4/67sR m5Mw== 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=g8ALrbnz1qXI5HffWq09XMPgoWQJ0GtQQ757vbcP15I=; b=bIviyNFDMNWSRvUqVTIlYSxHo8vArXNwbj3bgyOgFOGavVJXhoxY6v8L88GidVRuhV SeLhPAh2XcGTrNkKcxKExiFE6/YpyyuE7aloiECoBLQfyjnEhr8qv4EPz7JNb8AkzP9o IJ+ywndVt8QkYMra9hD982kN/9qOiu4lNG9UTSsUESWuRX35Zf+knKSTII7G++YNYwc3 vl1hzJs7StpCo/p/W/NNVGrynfJ9t6H/mUuK0+FOKSSKl6rV5ZmVpjuS/F0Bp5IEdRDP eGuDZ1k2G/lNqoWfvGVuU3RDxu9rEnUZf/P/i2Wi+sseC/hIRKxZwIN2P5smmIdyVLLP 0Jbw== X-Gm-Message-State: AO0yUKXg4BOJQimhk97xUL6XtVACyZDB7gLDSzmceNXuUdUb9Y1Xag2O RuCkSYD350s1z8xZ0RzG7KoPsL7YPLv8sD4k X-Received: by 2002:a05:600c:1c0e:b0:3df:ee44:e45a with SMTP id j14-20020a05600c1c0e00b003dfee44e45amr1344963wms.15.1675447840235; Fri, 03 Feb 2023 10:10:40 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id c7-20020a05600c0ac700b003d1d5a83b2esm8154958wmr.35.2023.02.03.10.10.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 Feb 2023 10:10:39 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Markus Armbruster , Eduardo Habkost , qemu-riscv@nongnu.org, =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Chris Wulff , Marek Vasut Subject: [PATCH 16/19] hw/nios2: Set QDev properties using QDev API Date: Fri, 3 Feb 2023 19:09:11 +0100 Message-Id: <20230203180914.49112-17-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230203180914.49112-1-philmd@linaro.org> References: <20230203180914.49112-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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 No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé --- hw/nios2/10m50_devboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/nios2/10m50_devboard.c b/hw/nios2/10m50_devboard.c index 91383fb097..01f6d5c84c 100644 --- a/hw/nios2/10m50_devboard.c +++ b/hw/nios2/10m50_devboard.c @@ -102,7 +102,7 @@ static void nios2_10m50_ghrd_init(MachineState *machine) MemoryRegion *dev_mr; qemu_irq cpu_irq; - object_property_set_link(OBJECT(dev), "cpu", OBJECT(cpu), &error_fatal); + qdev_prop_set_link(dev, "cpu", OBJECT(cpu)); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); cpu_irq = qdev_get_gpio_in_named(DEVICE(cpu), "EIC", 0);