From patchwork Tue Oct 17 14:01:49 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: 734408 Delivered-To: patch@linaro.org Received: by 2002:adf:f0cd:0:b0:32d:baff:b0ca with SMTP id x13csp499169wro; Tue, 17 Oct 2023 07:04:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHpUu9qd/zTKe7WNQ+opMOCCL1w3DqC0dYPXyDiuCe1Pl2ncC7TZ3cJpARrgTX/VRuj0pjz X-Received: by 2002:a05:6512:401:b0:504:7bb0:9d7e with SMTP id u1-20020a056512040100b005047bb09d7emr1925452lfk.27.1697551494476; Tue, 17 Oct 2023 07:04:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697551494; cv=none; d=google.com; s=arc-20160816; b=YI/jWfmlBh23ylvO9uRYt/KdBM8GIrldh2buZtjyww91fMfYFr27RzAk6iahJhpEhC ge7FGgtB879lwdnECzSepaxOepBdty2kH80iEf4fBv9i7MaMqJGNVfmWz77woO1sLZ8q SIWDMEPMI+olAblYDz9o1lDY74VKqfT/6pNBZyvWmSb4Uh8fCElhFulkcKkMmXbM3TwQ LTM7NxzBnrNZJqXQguGKDMYy2xkkfWLWbfpRzgy7WYEVnwSsncRHOROkBmiMM/zc6Gm/ UANieZgU960O+vr8Xsi2NzInqH1c9DG+vzLxKx38htLJxOiZJDLAqDRGmeDYOh5DbMF5 HxGg== 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=NToGoJ6Wynf9U+JMhRHgYhmueSEj1NaVzBYgpFOz3E4=; fh=PkQUf9c5shm23GEgSgwIjaGjrTFXVTBGToef+bFaIfM=; b=T1X1Awe8VMPM3rEFUb9jfQnJwB3uMAhbaI239JT/GkwCDFA94xzWcZFtaRbWf1n9Rd jXbjjSEM5TeTdQWjEh5lS1ijs4PmTjx7F93S3pa63PvS7HaY/oDcgo47GZsQLWmwo5MX /khJpAN7OYGpZ4JCwCuYyt7HmQ/KUAiarCdSneY7MBav2/YeVkYHjU+gA3fTg6kQM6AY isJedhZdRzHt3tdQbEQcACJ1DEclM5n390ZWWdI6Q3144XcnELDuhgo8BnMIJi3sLH6o chgZKzNZw5tWEEj8mX5XG9gO6J5Bpg/um3wK27xI34t/f0H4OFgcKCbWT/r+nUc8QDz8 6HaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ud+JuwQq; 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 x13-20020adff64d000000b0032d9357110asi1036812wrp.990.2023.10.17.07.04.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Oct 2023 07:04:54 -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=ud+JuwQq; 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 1qskeu-00054K-RE; Tue, 17 Oct 2023 10:02:56 -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 1qskem-0004OL-JA for qemu-devel@nongnu.org; Tue, 17 Oct 2023 10:02:50 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qskei-0008RF-Kt for qemu-devel@nongnu.org; Tue, 17 Oct 2023 10:02:48 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-32da9ef390fso2280392f8f.2 for ; Tue, 17 Oct 2023 07:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697551359; x=1698156159; 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=NToGoJ6Wynf9U+JMhRHgYhmueSEj1NaVzBYgpFOz3E4=; b=ud+JuwQq1dph6KsVXgWvspTQVI7sdDS3ycspcbTA4YwwurxLANaNIB6FsnvepHr7fX 2MYfvF49fVzTptSTTeusr5O6e0Egr0RIeyUhmVpZ32V5p+uB0/Nugd63oD/4wkb1Kqk/ J8eOjbsWY3XgKRsRBebsK4nCGhy2E+uKev06hDx+EWV/urBhuBzghfqd5alMcQxIfw2B c4TENnQhggLvnnaMQhecFUMDyDJnWG/6N8rNtG7lkt1hythIW5Oa7EyVGbs4wOpJtYjn JxIRdtQD9fzS6HzIXscCLAN+keWIVrLYbmP1VStmLbVSUDmoHDpxosQqEBXBeFSiSFYG +IJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697551359; x=1698156159; 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=NToGoJ6Wynf9U+JMhRHgYhmueSEj1NaVzBYgpFOz3E4=; b=c+uLL0LZIQBK/ZG4YTF0MZyfkRRZTJLd0GHTcBE+aRwxtHBM3x60PcJBHeiqzL7mGU Zjo/cyIY9+QhRtGGJ2mAbX3WpTEfExbLestN3Cc6G2E9vY45cgOkf/gx9K65N9NroIOA Ks0oDuuMQXZs2fYkSnZcrLucshuqxaVu7okXFtlfW1w9H8S9KrmBSeoxzpJ4KbxHLFPF 651HRqew5VduUykOatXpUk7Ez4ZFbuEarUKfVMeHJqROV71LWVtt4Z+7Mgco527gsbdh n9DI4voTiZSFqAE9zva38VN45q5GwpgFdve2PMLb1tQRQ7Wl6ZtTNxuJVDQ+EvlfLIFD +rSQ== X-Gm-Message-State: AOJu0YzesZ6LFpLx2SMKB1AEWM0jLHZLwGzPcr+Yqcy5z2KrWfN7jSQj eDo3bpwAuZSBYs2eDiW1B5HpnAAECvbLVYBreFgyRg== X-Received: by 2002:a5d:5107:0:b0:32d:937c:9ac9 with SMTP id s7-20020a5d5107000000b0032d937c9ac9mr2373929wrt.31.1697551358060; Tue, 17 Oct 2023 07:02:38 -0700 (PDT) Received: from m1x-phil.lan ([176.172.118.33]) by smtp.gmail.com with ESMTPSA id l17-20020a5d6751000000b003200c918c81sm1735455wrw.112.2023.10.17.07.02.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 17 Oct 2023 07:02:37 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Hanna Reitz , Fam Zheng , qemu-arm@nongnu.org, "Michael S. Tsirkin" , qemu-block@nongnu.org, Kevin Wolf , Jason Wang , Peter Maydell , Raphael Norwitz , "Edgar E. Iglesias" , Alistair Francis , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 6/7] hw/net: Declare link using static DEFINE_PROP_LINK() macro Date: Tue, 17 Oct 2023 16:01:49 +0200 Message-ID: <20231017140150.44995-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231017140150.44995-1-philmd@linaro.org> References: <20231017140150.44995-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.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 Declare link statically using DEFINE_PROP_LINK(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland --- hw/net/cadence_gem.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index f445d8bb5e..37e209cda6 100644 --- a/hw/net/cadence_gem.c +++ b/hw/net/cadence_gem.c @@ -1654,11 +1654,6 @@ static void gem_init(Object *obj) "enet", sizeof(s->regs)); sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem); - - object_property_add_link(obj, "dma", TYPE_MEMORY_REGION, - (Object **)&s->dma_mr, - qdev_prop_allow_set_link_before_realize, - OBJ_PROP_LINK_STRONG); } static const VMStateDescription vmstate_cadence_gem = { @@ -1691,6 +1686,8 @@ static Property gem_properties[] = { num_type2_screeners, 4), DEFINE_PROP_UINT16("jumbo-max-len", CadenceGEMState, jumbo_max_len, 10240), + DEFINE_PROP_LINK("dma", CadenceGEMState, dma_mr, + TYPE_MEMORY_REGION, MemoryRegion *), DEFINE_PROP_END_OF_LIST(), };