From patchwork Fri Feb 16 11:02:56 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: 773311 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp1285807wre; Fri, 16 Feb 2024 03:05:21 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX7RrDXlPp7hEgRsbuJ96oV3mpJWVg68J15EV+3kY4A4urFlLKoUerypOhTYxu/bYK3gyl8hI87PH3PhZSJPw4V X-Google-Smtp-Source: AGHT+IEOljiMO29Uev76VTyK+E0xSGGvtVqyaKmzgR7Y9aSfpMTXSFY5Z0MU6PF5e373nvgJ2aUU X-Received: by 2002:a0c:ca0c:0:b0:68f:1e47:a8c0 with SMTP id c12-20020a0cca0c000000b0068f1e47a8c0mr5312493qvk.11.1708081521717; Fri, 16 Feb 2024 03:05:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708081521; cv=none; d=google.com; s=arc-20160816; b=jtpISBVEy9aJQmyuVnifCVF+GomhbFud8iJcPTWamWAMAK4XbufrYR+zaSogF27djt DZu3WTPS1fh3sx/Ejxl9vzgMf8SdgEGzHFXLitWZ3bmq9vsmsfUj1cSibFdjPd4MzjPL 0pBf23CmE8vaJThNKJh6SfCZWfUtQ+QURl3bKM6AN+LAAVg0OFWa4zTA+fT1UyhLbWvP Kj48hy6MCEMOPfYHFrV17PFhX87QSgOVkRQJ8CFp8ri7JzlhkIvarwabh4erbT5JQFIY ZKE7tE3mW6K9/A6TogcMCrrEXxbh1Uh4OHJQxyp5zEQPVznfZFqi9yJpAgJ3CKqfYHiQ qfug== 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=NuItVagnX21LnnaFpIrCDiEh6nnybH9GKoEtwiotckg=; fh=MYr+tyZZlCa/Q0qkt125rkFGddyr3/nqWgQD3VNiOug=; b=MoOPnkVbPQHQzsPe/4kdrLcpaqu7nMufoGMh411haFmc4YFJ2XRZhPqGay4//+LxG3 9X+IEAg7Lzn54RZWNhr/M+N1qxD7WxnALOrgb67mO2S6MnkQ1ujP/qbKW+zQU4/Sp/8T wosJsTrSonBvi69DBxaxK9uDKzpd3OaNm+JB23XVXaSgooaJBMrYM49sfp8o+tbhBkdI k7TtkMiwyeD+aioWz/C9IPqm+GyUaDqB5rsj/7COMzDp0jbG8XH8yjLKUPWHVJwkwo2o 3QG7zKx7wZyKCYfKCxl4l2MWmjeoJz+etX8Ak4aX+tHIIEuDueUk8ImsS2QuKz4Rogv3 NJvQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zNIr7y0E; 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 m14-20020a0562141bce00b0068cb7c033d6si3722132qvc.24.2024.02.16.03.05.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Feb 2024 03:05:21 -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=zNIr7y0E; 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 1raw0X-0006TQ-Gu; Fri, 16 Feb 2024 06:03:53 -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 1raw0W-0006RK-5J for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:03:52 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raw0U-0000tB-2g for qemu-devel@nongnu.org; Fri, 16 Feb 2024 06:03:51 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-412345cca4eso7136985e9.2 for ; Fri, 16 Feb 2024 03:03:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708081428; x=1708686228; 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=NuItVagnX21LnnaFpIrCDiEh6nnybH9GKoEtwiotckg=; b=zNIr7y0EqNB2slVEoVD7JE/EWg79kDhOfze+vjPAGjuJ35R1MMLkDxzeIG9MuY2uTc teic7TqLhD7U17NYex5MxbWWKRrFY7mLll2gs18eQ5pdqS7v0IZjK4k8TuExWAyN1WYP ETooz96kVf67wAqZhv05YpAwLvvO3m8mRkWsXrb1Fll6N4/ISmgIsINOmYod0EHbmJvJ NI2JTpSHqi7DDFPc1+hnuylXIkr1dBEv3bqdc9IybqRfoMtGwKjIQcLII3Qo5Dy6hvih +jqIQAzq3wnKZkwCzefgEewZxjgxR2LZfedaGU/EDu+x52xWs9m8iPkpXEM/UqNteDio lEBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708081428; x=1708686228; 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=NuItVagnX21LnnaFpIrCDiEh6nnybH9GKoEtwiotckg=; b=iF11jaQZNJSJKJtP/V8da8L8guObVERNqzDfnKf950D29Kj4L2EUz8ThzTRT8Fz+XW /OThyhT+QVYEKuVEQYmtZjcCdW99aPE7dWqbIH+xxldCKiH2I7cS1AeF5ihAw7A7MU46 52zRuZIL2sYReVKEYJc8w9Vu04pEqHTR9RuGCIC5j2GhZweUNlv5te5+VGeCPpqBE8qh CJvRZiWVXk6mWyaP05yRsd4Gtcltg5tq+gQSTB92/2w1SWfud0tOsZhT1mYphWZo49Pr aQsLbx7yNwsHkv33Zne8W03QMw8AWBAhWTgSAI3zmlDoOQQetd7qxlErS5pI4LdaQsoH vIrQ== X-Gm-Message-State: AOJu0YwQTJhp+6qZJBnJn1I+0OTiyoBmfgV/T2ARK67rZvggMABUEOt4 SXwmyX+1x5jefWNiqLFq/9/Q2fDmLqmQ+MlOGzmpoGP6jzyH0ZPxzciVhrzVOPJM0HKJBvL6zKb Y X-Received: by 2002:adf:f34b:0:b0:33c:e1fc:65c5 with SMTP id e11-20020adff34b000000b0033ce1fc65c5mr3642680wrp.69.1708081428352; Fri, 16 Feb 2024 03:03:48 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.246]) by smtp.gmail.com with ESMTPSA id k4-20020a5d5184000000b0033b4f82b301sm1942603wrv.3.2024.02.16.03.03.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Feb 2024 03:03:47 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?C?= =?utf-8?q?=C3=A9dric_Le_Goater?= , Nicholas Piggin , =?utf-8?b?RnLDqWTDqXJpYyBCYXJyYXQ=?= Subject: [PATCH 05/21] hw/ppc/pnv_bmc: Use qdev_new() instead of QOM API Date: Fri, 16 Feb 2024 12:02:56 +0100 Message-ID: <20240216110313.17039-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240216110313.17039-1-philmd@linaro.org> References: <20240216110313.17039-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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: Cédric Le Goater --- hw/ppc/pnv_bmc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ppc/pnv_bmc.c b/hw/ppc/pnv_bmc.c index 99f1e8d7f9..0c1274df21 100644 --- a/hw/ppc/pnv_bmc.c +++ b/hw/ppc/pnv_bmc.c @@ -269,13 +269,13 @@ void pnv_bmc_set_pnor(IPMIBmc *bmc, PnvPnor *pnor) */ IPMIBmc *pnv_bmc_create(PnvPnor *pnor) { - Object *obj; + DeviceState *dev; - obj = object_new(TYPE_IPMI_BMC_SIMULATOR); - qdev_realize(DEVICE(obj), NULL, &error_fatal); - pnv_bmc_set_pnor(IPMI_BMC(obj), pnor); + dev = qdev_new(TYPE_IPMI_BMC_SIMULATOR); + qdev_realize(dev, NULL, &error_fatal); + pnv_bmc_set_pnor(IPMI_BMC(dev), pnor); - return IPMI_BMC(obj); + return IPMI_BMC(dev); } typedef struct ForeachArgs {