From patchwork Thu Feb 22 12:55:11 2024 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: 774859 Delivered-To: patch@linaro.org Received: by 2002:a5d:6ac2:0:b0:33b:4db1:f5b3 with SMTP id u2csp748551wrw; Thu, 22 Feb 2024 04:56:36 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXYf5F/U9SFNAasXEIXg1YyKNB3ZUnO21W0AKHfK7gDlmPZo/3VlQhC8cHju5GbfIoQQFK4IH5e28BLjl9fh9ru X-Google-Smtp-Source: AGHT+IFXWjvbkMPjJnwJlGwTpDQHCAYMoimLRktjsGhdxQIDYCZSOYUbcFQIJrd+/C9YWUa1Vi1c X-Received: by 2002:a05:620a:4911:b0:787:3ac3:eb6e with SMTP id vy17-20020a05620a491100b007873ac3eb6emr17740063qkn.52.1708606596659; Thu, 22 Feb 2024 04:56:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708606596; cv=none; d=google.com; s=arc-20160816; b=f3DYV6HZMzQ6OtZ6tyKAvFU8HeXf5pDvS+1YBEFD4N6s7gYGtuetWo40L7Jg7B6x31 WsRSDfDY+M+rPXifuOGCUq/Lzq0JjC+m5oi8GPjVHhxb0aZokYwaHLxdktplIPjoE5/H WVe/rKbSOg8SBVeKOrU659H9/SYMTiE+NG3f2/XpIbsRPbXxW5DhIwhi3q/8edJ4SgPt fndCqXpJJtHLyi1CwIWBDlpIKy5qg1jn7hKZPzGR2h6VOrCz7FNcL7p1R8ql3X7lVXds 39MpKawYf0gYdIkMIyI2+lKWdFFD7j7oysKSS48v2+FfUmGubmCkFSkLr6TQiKGgiRXF LOUg== 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=JspwhcdtiFe4E7MZg2XJDqNEWrT6NpNFHrvazz9D4TA=; fh=K3x3J8Xp5VU4VzsFAGde4ovaTF+xFvMCZIIYJ5u7mVs=; b=UqiJhIrqLVgQ+UQC2wTWgpx/rVKg2CV06FTu+o8HtrK60dKAYqkR8uq1wlCiH38tCk j2YArKJCAYBOM7nAm9eoKHUPXK/F1hx392REE8/cn14JhcyiZCiaA5KzVnaj1pJNIbya lyiYAhAAUFATEVNZ2X7dQi/5ylD1KEWmj/yHRNK5OmOsyQKZymHOI73sFmI06JSsYzNY 62z9gArH7yklvRsKlCtIicaZf41BSybzlVKkN8Jzy7FMiRCWjT7zJQco6bi9gNtYeKOT P6uPmfDkcs1Qni/CPin4iu/P2/6qEDU0fUkckrgJAAbMDBDkFLoG1gYQy6/8ZtJo4sj/ tNcQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yUMu3a29; 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 x18-20020a05620a099200b00783e46b2470si12598751qkx.600.2024.02.22.04.56.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Feb 2024 04:56:36 -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=yUMu3a29; 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 1rd8cB-00065a-Kl; Thu, 22 Feb 2024 07:55:51 -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 1rd8c4-000629-LC for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:55:45 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rd8bz-0004nf-U0 for qemu-devel@nongnu.org; Thu, 22 Feb 2024 07:55:44 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4128cfb6b6fso2076755e9.0 for ; Thu, 22 Feb 2024 04:55:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708606538; x=1709211338; 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=JspwhcdtiFe4E7MZg2XJDqNEWrT6NpNFHrvazz9D4TA=; b=yUMu3a29L2vgv4cUyyDs9KmC/hBnfCS2Orsr7vpoVMyk9pczuoIhTsB3ZePCykc7nD EDCjcL/ITudmpgV76u700Xl6m+kWhddLiJB9Pu168pDtWf8ZVmjsqY77sjplnzpp+AEW xjBz0AuFf5sgKw/HO2UMLSfdplJZRgVnawpI8fZetghiwDs5Xo3PZxi5ntJn2/GlE9EG MqXzRQjGI5SDaEvk6AzGqmak0mTEQLBWmVw9I7cUJnLv+NZSO4shL/xkniedc6cGJdry Ank2sA5Jcfp08O0+sANAkoLGZPYlOQBzpjdGeUDaKSQohugsokYEBHTfLZV2V4DROzLR rp2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708606538; x=1709211338; 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=JspwhcdtiFe4E7MZg2XJDqNEWrT6NpNFHrvazz9D4TA=; b=c4e68F5rpYeunf/84BL92ura2ou/lVtcXO0ArXa6DiCwagrpbx9QsujzpxtF8PZlEl U8Ot2Ku8jzFP8cE4eOE1yVRM9s+0sbTCbTPSXxuq1AfUxhPiUpfusdZmdWjUD66dcJdW feoqNuhtlS+XLwPmchk9TY7S7rJdbbJ3Fc4QooIROI81fpuprZCA4RYwOFeSAJ/uEinW NSOFVAEeqJC1CLtIS+eht95yPpghakcGIzTxvfSlsbJeGwQNp4RyAAShJzvrW5pqoQbp g0HMQQBlinQZ5g0WsDkBsnK5Ttgee3hLP80y1pcl4ab6xS0RJcR+khjEbpoZV2fmLYFb Q1BA== X-Gm-Message-State: AOJu0Yx1JdUGY2g9eBbk7SP71BufRyz5KzT79p6EDBWQdlqh/4I2+utZ OC2cFNjFX1sfta+kE1G1Glz2s6yc9zwfhBVEp9/B1zmWky/9OjEFvmJHFdw+9LRrjS9dqizeDTn RExE= X-Received: by 2002:a05:600c:1c0d:b0:412:64cb:eff3 with SMTP id j13-20020a05600c1c0d00b0041264cbeff3mr8722712wms.3.1708606538147; Thu, 22 Feb 2024 04:55:38 -0800 (PST) Received: from m1x-phil.lan ([176.187.211.34]) by smtp.gmail.com with ESMTPSA id by1-20020a056000098100b0033d873f08d4sm3626621wrb.98.2024.02.22.04.55.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 22 Feb 2024 04:55:37 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bastian Koppelmann Subject: [PULL 09/32] hw/tricore/testboard: Use qdev_new() instead of QOM basic API Date: Thu, 22 Feb 2024 13:55:11 +0100 Message-ID: <20240222125517.67131-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240222125517.67131-1-philmd@linaro.org> References: <20240222125517.67131-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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, T_SCC_BODY_TEXT_LINE=-0.01 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 Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bastian Koppelmann Message-Id: <20240216110313.17039-5-philmd@linaro.org> --- include/hw/tricore/tricore_testdevice.h | 3 --- hw/tricore/tricore_testboard.c | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/include/hw/tricore/tricore_testdevice.h b/include/hw/tricore/tricore_testdevice.h index 8b4fe15f24..2c57b62f22 100644 --- a/include/hw/tricore/tricore_testdevice.h +++ b/include/hw/tricore/tricore_testdevice.h @@ -25,12 +25,9 @@ OBJECT_CHECK(TriCoreTestDeviceState, (obj), TYPE_TRICORE_TESTDEVICE) typedef struct { - /* */ SysBusDevice parent_obj; - /* */ MemoryRegion iomem; - } TriCoreTestDeviceState; #endif diff --git a/hw/tricore/tricore_testboard.c b/hw/tricore/tricore_testboard.c index b6810e3be0..c29db8b451 100644 --- a/hw/tricore/tricore_testboard.c +++ b/hw/tricore/tricore_testboard.c @@ -89,9 +89,7 @@ static void tricore_testboard_init(MachineState *machine, int board_id) memory_region_add_subregion(sysmem, 0xf0050000, pcp_data); memory_region_add_subregion(sysmem, 0xf0060000, pcp_text); - test_dev = g_new(TriCoreTestDeviceState, 1); - object_initialize(test_dev, sizeof(TriCoreTestDeviceState), - TYPE_TRICORE_TESTDEVICE); + test_dev = TRICORE_TESTDEVICE(qdev_new(TYPE_TRICORE_TESTDEVICE)); memory_region_add_subregion(sysmem, 0xf0000000, &test_dev->iomem);