From nobody Tue Feb 10 10:20:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1571854202; cv=none; d=zoho.com; s=zohoarc; b=nkp5GCJWYTP3L+fK7ymGoRm/IEZzKvdOlvUpe+0NnisUkLAx2FEhn10tFV1TKxcKJXiYs2ovF9k6iIc0uRVWx5wfDteAt9gHz+RNZg4jhek7l2p9z0Ztg8VgPD3zn/Fc10YdWWloewAE1VI0OzzP1xSbEPs7txNxwGRdfF1iHwU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571854202; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uRcevYlv0dVgCjvswi8iWE9SF8YIZpxrJoGckyI6E5E=; b=KuRNF76ZcnwwKe2/ncbMxJdJoDgp/bA1+nOzHFF2SryXZjU8h8X7lsoI2shhn0bA6RPKYvf2LnHWBS9l1SXqh0gbk/8ROn1hISf2pXP5pnalWsGTkxzyBZceH2lGv/g5rebHcV3Riu/HjsjyLmBRY9t9irZkCbY5b/MKP/1GNHQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1571854202912481.1779331221072; Wed, 23 Oct 2019 11:10:02 -0700 (PDT) Received: from localhost ([::1]:43262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNL57-0006uh-AB for importer@patchew.org; Wed, 23 Oct 2019 14:10:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59626) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNKWs-0005BV-4L for qemu-devel@nongnu.org; Wed, 23 Oct 2019 13:34:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNKWp-0002Co-O0 for qemu-devel@nongnu.org; Wed, 23 Oct 2019 13:34:37 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:54264 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iNKWp-0002C8-D4 for qemu-devel@nongnu.org; Wed, 23 Oct 2019 13:34:35 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-239-y_YU16iLOl23DKjRYuNApg-1; Wed, 23 Oct 2019 13:34:31 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8F06C5E9; Wed, 23 Oct 2019 17:34:29 +0000 (UTC) Received: from localhost (ovpn-112-21.ams2.redhat.com [10.36.112.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1D8035DC18; Wed, 23 Oct 2019 17:34:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571852075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uRcevYlv0dVgCjvswi8iWE9SF8YIZpxrJoGckyI6E5E=; b=PNmXoEOv2acHPPYJChDUDzFf1WAE6UXZfZwj73lVd3oLLaKHSYV53SLs4BYpK6sGtCL2Fd MZK7Pxp5zEq2OO/h9wC2hmOGmnFq9k7d5lAvbordtq4TsvXzx3l7df4A0DX3EI86u5cwaR iy8ZkwDP2naKPeLlbYn2g0KHc5qpNqI= From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Subject: [PATCH v3 21/33] lance: replace PROP_PTR with PROP_LINK Date: Wed, 23 Oct 2019 19:31:42 +0200 Message-Id: <20191023173154.30051-22-marcandre.lureau@redhat.com> In-Reply-To: <20191023173154.30051-1-marcandre.lureau@redhat.com> References: <20191023173154.30051-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: y_YU16iLOl23DKjRYuNApg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Corey Minyard , Peter Maydell , "Michael S. Tsirkin" , Jason Wang , Mark Cave-Ayland , KONRAD Frederic , "Edgar E. Iglesias" , Paul Burton , Aleksandar Rikalo , Magnus Damm , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Artyom Tarasenko , Eduardo Habkost , Fabien Chouteau , qemu-arm@nongnu.org, Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/dma/sparc32_dma.c | 2 +- hw/net/lance.c | 5 ++--- hw/net/pcnet-pci.c | 2 +- hw/net/pcnet.h | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/dma/sparc32_dma.c b/hw/dma/sparc32_dma.c index 0e5bbcdc7f..3e4da0c47f 100644 --- a/hw/dma/sparc32_dma.c +++ b/hw/dma/sparc32_dma.c @@ -346,7 +346,7 @@ static void sparc32_ledma_device_realize(DeviceState *d= ev, Error **errp) d =3D qdev_create(NULL, TYPE_LANCE); object_property_add_child(OBJECT(dev), "lance", OBJECT(d), errp); qdev_set_nic_properties(d, nd); - qdev_prop_set_ptr(d, "dma", dev); + object_property_set_link(OBJECT(d), OBJECT(dev), "dma", errp); qdev_init_nofail(d); } =20 diff --git a/hw/net/lance.c b/hw/net/lance.c index 6631e2a4e0..4d96299041 100644 --- a/hw/net/lance.c +++ b/hw/net/lance.c @@ -138,7 +138,8 @@ static void lance_instance_init(Object *obj) } =20 static Property lance_properties[] =3D { - DEFINE_PROP_PTR("dma", SysBusPCNetState, state.dma_opaque), + DEFINE_PROP_LINK("dma", SysBusPCNetState, state.dma_opaque, + TYPE_DEVICE, DeviceState *), DEFINE_NIC_PROPERTIES(SysBusPCNetState, state.conf), DEFINE_PROP_END_OF_LIST(), }; @@ -153,8 +154,6 @@ static void lance_class_init(ObjectClass *klass, void *= data) dc->reset =3D lance_reset; dc->vmsd =3D &vmstate_lance; dc->props =3D lance_properties; - /* Reason: pointer property "dma" */ - dc->user_creatable =3D false; } =20 static const TypeInfo lance_info =3D { diff --git a/hw/net/pcnet-pci.c b/hw/net/pcnet-pci.c index 4723c30c79..d067d21e2c 100644 --- a/hw/net/pcnet-pci.c +++ b/hw/net/pcnet-pci.c @@ -231,7 +231,7 @@ static void pci_pcnet_realize(PCIDevice *pci_dev, Error= **errp) s->irq =3D pci_allocate_irq(pci_dev); s->phys_mem_read =3D pci_physical_memory_read; s->phys_mem_write =3D pci_physical_memory_write; - s->dma_opaque =3D pci_dev; + s->dma_opaque =3D DEVICE(pci_dev); =20 pcnet_common_init(DEVICE(pci_dev), s, &net_pci_pcnet_info); } diff --git a/hw/net/pcnet.h b/hw/net/pcnet.h index 28d19a5c6f..f49b213c57 100644 --- a/hw/net/pcnet.h +++ b/hw/net/pcnet.h @@ -50,7 +50,7 @@ struct PCNetState_st { uint8_t *buf, int len, int do_bswap); void (*phys_mem_write)(void *dma_opaque, hwaddr addr, uint8_t *buf, int len, int do_bswap); - void *dma_opaque; + DeviceState *dma_opaque; int tx_busy; int looptest; }; --=20 2.23.0.606.g08da6496b6