From patchwork Fri Aug 30 14:58:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 824014 Delivered-To: patch@linaro.org Received: by 2002:a5d:48c1:0:b0:367:895a:4699 with SMTP id p1csp823994wrs; Fri, 30 Aug 2024 08:00:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWgMhUQjNvCisS0H87ccOTGOnTj9RivLzTEWC+EGDf3R6psS58HTxLySgA39MAlTor9h72Pcw==@linaro.org X-Google-Smtp-Source: AGHT+IEs32UZbBzIRIqcoHAgKV0HkvoFUpb1lYMmXehWb6Tkp8wudi4/fvxtQ46ekKgIvkkjdfIW X-Received: by 2002:a05:6214:5784:b0:6bf:8d1f:2586 with SMTP id 6a1803df08f44-6c33e685cc0mr69369706d6.42.1725030011221; Fri, 30 Aug 2024 08:00:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725030011; cv=none; d=google.com; s=arc-20160816; b=TmXCp1mOLBDT7XYEwKm71uF0vxjsQHLaQOzUqc2o8ZFl1Aqtu6iLk0PuvY4F0SCoSU gF6ibJTrdmdTMUQyV8X7piE3S1wkCjoYd9wqMFyE+q3yGAMb4MTnBTA5yneZY1gVboUT jzB3FLZ6Bh3KEVuvcpJ7pdRqOes50QBqXfLYcJPijL7V1st061UIXzAxJjLbZu7WRzcc usEZ49NpseRUOqsLU4at+H6dd+/ZCeSGP00qQFKyyUjHfikv4k9opNFxoxD5x2tcfatt FYVI4MAnlmYs1J6foOaK8cFafMJDOzH/KwNrE09OCRhRn1WI4C+nZ2DQW96In7bzwI/+ fVHA== 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=EESAaw4Z2DDsWl+A+cySiG9CVy8SPP53rBykihg+Up8=; fh=aZP5QcqmVCTfLe93cJ47kfqkp9RGJPPxVVJ3kRoWYP4=; b=R3Sypmv6U5JOzxkpJ5nNZ+bCu6nyPYliHga90qivVbYRtFcGY/h+kMsvf0V3KnlDMw fdpqkEnf4Zv5w3z/usgPKt9wD3nW62NhnfmQc0s7T5X8Xut0I0w/RgX+zreRDSLztdQC bXcvVvdwRyYnJdlwVYUq00sUQavQkxwGbqXnypTcE+jCw/Se7Sg0uHj7nkwyIkmz7mCH Znh+vlb8+z39FgHCtr5yGP+5e/0ZAqtgYkTwuJqJHzbWuiPt8lbfhsWKJVM4EonxzVIq YfSqibMNLM3Vx5/g5upZ/MghqiLixFRejTK8n1pSXhznN1bovDDm7Rk5KR312dW75gcH Uamw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nMEkKSk3; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-45682e2ad37si39534841cf.742.2024.08.30.08.00.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Aug 2024 08:00:11 -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=nMEkKSk3; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sk34w-0004xF-JO; Fri, 30 Aug 2024 10:58:22 -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 1sk34u-0004qP-OE for qemu-devel@nongnu.org; Fri, 30 Aug 2024 10:58:20 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sk34s-0004aE-K5 for qemu-devel@nongnu.org; Fri, 30 Aug 2024 10:58:20 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-371b015572cso1542096f8f.1 for ; Fri, 30 Aug 2024 07:58:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725029897; x=1725634697; 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=EESAaw4Z2DDsWl+A+cySiG9CVy8SPP53rBykihg+Up8=; b=nMEkKSk33uoIKtgZnUYSjSp6QVwBvPL/knyGH+KFLqSIbrG99Pfz1FCAmVrU1LZVEI 6yGDhPYRwgVkq+CKYKv0ypU9petHq/6fXXmsO0Hy1hhqr3++yGhFyF/qV77p3EJI4k2a 2pR33UAWxEizNJn3kuzE7zB09+21diamWOl1vj1IACx2NMY3nexEvOj4+AodLnbT12rF gJ/JvBQE4dvXfi7TOB8RLAsUFmxUERW7CW35258JOsP/1Hazx7N6ETrrd75VkbmXzTrh hhl5TpQZE8qk7L3oZOiFM8rVhsGXeeHZF7MOMiQ98usZdP4uaADk8lHwrcZnzfQiMV8c pVRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725029897; x=1725634697; 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=EESAaw4Z2DDsWl+A+cySiG9CVy8SPP53rBykihg+Up8=; b=NjXX4eK4OrCnE2gDjnQ95IuIGhGZ3hg1AFiBsXAsq5tbVjXSqDmdeTY36+xn7tO0TQ A+uMBeVMfBUSbd3q2ApOUUwokO5dII5LLsLDdvkkmKxZYyS4ad6mK4KM0LiTFgcAkPg0 To7gs1D4HFhqvQcEgte0jZw1NnMbJiQfG/OrLCuB1BQrKZ/If4XaR6QmHQ2Im41c7lb1 Mjk68q6a5+HUpANfd7g29oeK/dOnRmYfPc/ACgdo34gVc++zuyxKUlgrlhRuZM3Y7JHb aC64S4whwy+qQBw2Q2P14+Jom2WT1VKzVpJFaaF8vaCZyWnAhHNgosZTicQtHMP+ReZT z4VA== X-Gm-Message-State: AOJu0Yw8zonIEa0LLU5BWQCq3HSkz3/QKHOLgFHRVq0BBijH3GN5THtH RPoZmw/BUN1/ZzOLA6+mTRldAfMJ4Ybj2suCaaDaqDthQGR5229N8JcvqzSTzQfBPmxLvHEnZ0d P X-Received: by 2002:a5d:6a09:0:b0:371:8685:84e with SMTP id ffacd0b85a97d-3749b544d97mr6037584f8f.22.1725029896658; Fri, 30 Aug 2024 07:58:16 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42bb6da24bbsm49022345e9.0.2024.08.30.07.58.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2024 07:58:16 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Thomas Huth , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , David Hildenbrand , Ilya Leoshkevich , Cornelia Huck , Halil Pasic , Eric Farman , Christian Borntraeger , Nico Boehr , Nina Schoetterl-Glausch Subject: [PATCH v2 04/11] hw: Remove device_class_set_parent_reset() Date: Fri, 30 Aug 2024 15:58:05 +0100 Message-Id: <20240830145812.1967042-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240830145812.1967042-1-peter.maydell@linaro.org> References: <20240830145812.1967042-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x432.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 There are no callers of device_class_set_parent_reset() left in the tree, as they've all been converted to use three-phase reset and the corresponding resettable_class_set_parent_phases() function. Remove device_class_set_parent_reset(). Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/hw/qdev-core.h | 16 ---------------- hw/core/qdev.c | 8 -------- 2 files changed, 24 deletions(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 77bfcbdf732..18c7845ce9b 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -937,22 +937,6 @@ char *qdev_get_own_fw_dev_path_from_handler(BusState *bus, DeviceState *dev); */ void device_class_set_props(DeviceClass *dc, Property *props); -/** - * device_class_set_parent_reset() - legacy set device reset handlers - * @dc: device class - * @dev_reset: function pointer to reset handler - * @parent_reset: function pointer to parents reset handler - * - * Modern code should use the ResettableClass interface to - * implement a multi-phase reset instead. - * - * TODO: remove the function when DeviceClass's reset method - * is not used anymore. - */ -void device_class_set_parent_reset(DeviceClass *dc, - DeviceReset dev_reset, - DeviceReset *parent_reset); - /** * device_class_set_parent_realize() - set up for chaining realize fns * @dc: The device class diff --git a/hw/core/qdev.c b/hw/core/qdev.c index f3a996f57de..cf811580621 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -844,14 +844,6 @@ static void device_class_init(ObjectClass *class, void *data) offsetof(DeviceState, parent_bus), NULL, 0); } -void device_class_set_parent_reset(DeviceClass *dc, - DeviceReset dev_reset, - DeviceReset *parent_reset) -{ - *parent_reset = dc->reset; - dc->reset = dev_reset; -} - void device_class_set_parent_realize(DeviceClass *dc, DeviceRealize dev_realize, DeviceRealize *parent_realize)