From patchwork Fri Feb 3 21:16:19 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: 650111 Delivered-To: patch@linaro.org Received: by 2002:a17:522:d8c:b0:4be:c3dc:14d8 with SMTP id d12csp1057239pva; Fri, 3 Feb 2023 13:18:20 -0800 (PST) X-Google-Smtp-Source: AK7set/TA7irJuIPzjozC401iYa8tXNK6smbUzLm45iKzZVNmzQFPVNsovw1Wx7JwUUz/BLOsJID X-Received: by 2002:ac8:5cd3:0:b0:3b9:bb27:e116 with SMTP id s19-20020ac85cd3000000b003b9bb27e116mr19915551qta.1.1675459100071; Fri, 03 Feb 2023 13:18:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675459100; cv=none; d=google.com; s=arc-20160816; b=aHRBv9soS/kZqQG4m2FdqMtGOMMgeIYcMQ/WUrbiBLmhKst39nqexo/p4s1LJ1EYvW 3DN51cBZiyhXxtim5pyasauHLMShP61kvU+dmX64yP2dpCD6mIzgT7jT/qyDtmKVKXOV sPg8c8mQozV/KM0MYx/xJHaC5YmMGn9z/rgBoQZi/nwTpqW2JKBj4gGbU/uTqvKGqxEy 4/zqSvETv8U1IwgfcYgdRnD8PlV4weNLtjjtbLzTBpo+Dz9gCHYKakz1kSE8thOgtEK8 okxexCqgmN8egehDlX3EK4dFsxKWaNEdcLGpJ5maQfhnxKPjbPQCKtvIp5L9lx6FAxaC xskg== 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=hTCwlrhJCIZguZaGgCCFrwh716fRCo2CcQ01yatwjNM=; b=tj2iSvvgAIy5/dt2AVX/NizXlMUPKp7E04xw1KOnErMisql+Fku0Ec22jWbtxNlQSZ DbTveslZPv3SjewZh70tZFR3cacmiFF0w/EHIlYU+CqvftPWKZQE+Gk8R3M+smll+3OU +exVkYKhDNnf7tsgP/za/nLH003ExkAskahSeOORzIcjsuHNwYktxHMCScRiyaO35dX7 ykjhYLkvAZfzqhClYbDmGA3Guj1PWaUUuo3hblhGjB5uojtmsq9t8BJVOVJ75gEIlgHB tuzx5lqG3mb9da/AGWQGVj2oyBLY6qB9BTeBdfzDhtMaQhDM8Jrm/zw9iEuZ7aWmBYPV pPcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YPv6OCOF; 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 j185-20020a3787c2000000b00704d8dcff6asi2664123qkd.437.2023.02.03.13.18.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Feb 2023 13:18:20 -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=YPv6OCOF; 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 1pO3Qb-0000KN-Tw; Fri, 03 Feb 2023 16:17:01 -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 1pO3QE-0000EK-3u for qemu-devel@nongnu.org; Fri, 03 Feb 2023 16:16:45 -0500 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pO3QC-0006Ac-2H for qemu-devel@nongnu.org; Fri, 03 Feb 2023 16:16:37 -0500 Received: by mail-ej1-x636.google.com with SMTP id lu11so18899827ejb.3 for ; Fri, 03 Feb 2023 13:16:35 -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=hTCwlrhJCIZguZaGgCCFrwh716fRCo2CcQ01yatwjNM=; b=YPv6OCOFNmSqb9r3qVkITNmE1Qe3UrWL+M6ecJq0nPLVjhWsyRVlxRvpqMr/cqJHfl Lwee2uTqRg0JcPCDYAp9X1JgPx0Ez5L2qL5uUDt3nb90wQk5q/9ZvIom27mItRQ8A3Qn YNI+CgRoQL53Ej2UFnF+CttqMPbmKJPK4zVPwMlIEmHCf0+HfNSv13QQeqY2JxGkPECT W81zAALLn5fTjSyXY6R3qF8UD3EZ40XFwuhFv4M9ISUWVMF3GHWFXIkxnVkd2OZ5yMtH 4ILfusxe3w+ftE0h6qeor+eKwQlA1TU/LJRL7lscySQL294LkuxZjObV4wm7In9eKEJU TL6Q== 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=hTCwlrhJCIZguZaGgCCFrwh716fRCo2CcQ01yatwjNM=; b=wFzVsDAkc8djXWN8BNIaOUcfdiRcaEq6mU+SDBigF54xnGpXT/QX3kHNtETsUbonT2 h1kswnR2f6n/1eO7K4X2I15AmSy8la6nMcrTAQLTihMbfy4Hkv3QhGE8VDyMmW86Y4Wa HHFg3BHRdH7FGebT0nPrZVlifhd10Z8F3tszTB5dhjXbJyRYvCshBA2S/CrGcjcK7aAQ 8HxkRcKC+lbnuG/kqexrnD8nuu2DU2am2hARjdg2uj186md+xjZcHOhqzVt/rZ616R3z d87fIv6AsNnclbVVj5dH5Cm+rcaaTP7gIJDVd/bAHwGE71VopOk5MdcHQzDvUgohuitl D+BA== X-Gm-Message-State: AO0yUKXeTUvqkdSfp6EN3D5aocvu7ENaOYOlAPF3vaftOpyhwyWllR/Y uMn1PNS50IkLtWatxjjcxk0iP3yPsTvbVpV2 X-Received: by 2002:a17:906:8e16:b0:88b:f26d:7b25 with SMTP id rx22-20020a1709068e1600b0088bf26d7b25mr3024678ejc.28.1675458994230; Fri, 03 Feb 2023 13:16:34 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id u11-20020a170906408b00b0088a694749f7sm1889419ejj.4.2023.02.03.13.16.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 Feb 2023 13:16:33 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: BALATON Zoltan , Mark Cave-Ayland , qemu-ppc@nongnu.org, =?utf-8?q?Herv=C3=A9_Poussineau?= , =?utf-8?q?C=C3=A9?= =?utf-8?q?dric_Le_Goater?= , Daniel Henrique Barboza , Markus Armbruster , David Gibson , Greg Kurz , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 1/5] hw/misc/macio: Set QDev properties using QDev API Date: Fri, 3 Feb 2023 22:16:19 +0100 Message-Id: <20230203211623.50930-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230203211623.50930-1-philmd@linaro.org> References: <20230203211623.50930-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=philmd@linaro.org; helo=mail-ej1-x636.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 No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. All calls use errp=&error_abort, so converting to the QDev API is a no-op (QDev API always uses &error_abort). Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/macio/macio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c index 08dbdd7fc0..66393280f1 100644 --- a/hw/misc/macio/macio.c +++ b/hw/misc/macio/macio.c @@ -128,8 +128,7 @@ static void macio_realize_ide(MacIOState *s, MACIOIDEState *ide, sysbus_connect_irq(sysbus_dev, 0, irq0); sysbus_connect_irq(sysbus_dev, 1, irq1); qdev_prop_set_uint32(DEVICE(ide), "channel", dmaid); - object_property_set_link(OBJECT(ide), "dbdma", OBJECT(&s->dbdma), - &error_abort); + qdev_prop_set_link(DEVICE(ide), "dbdma", OBJECT(&s->dbdma)); macio_ide_register_dma(ide); qdev_realize(DEVICE(ide), BUS(&s->macio_bus), errp); @@ -336,8 +335,7 @@ static void macio_newworld_realize(PCIDevice *d, Error **errp) /* PMU */ object_initialize_child(OBJECT(s), "pmu", &s->pmu, TYPE_VIA_PMU); - object_property_set_link(OBJECT(&s->pmu), "gpio", OBJECT(sysbus_dev), - &error_abort); + qdev_prop_set_link(DEVICE(&s->pmu), "gpio", OBJECT(sysbus_dev)); qdev_prop_set_bit(DEVICE(&s->pmu), "has-adb", ns->has_adb); if (!qdev_realize(DEVICE(&s->pmu), BUS(&s->macio_bus), errp)) { return;