From patchwork Fri Sep 13 15:13:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 828188 Delivered-To: patch@linaro.org Received: by 2002:adf:a2d0:0:b0:367:895a:4699 with SMTP id t16csp300640wra; Fri, 13 Sep 2024 08:18:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUzmWEcph5gZ7q5Tq+8pJRuHqKq492aXUxrk+ATs3qSzRofxO4Eq3NdmS8EfWFqJa7DkuutNw==@linaro.org X-Google-Smtp-Source: AGHT+IERGnJwlMGUj1pHtHZpRBGzWhYfuC17dFHll73BeFe0heJPWskJwp54IuE0PSMJIOoLIcGD X-Received: by 2002:a05:620a:2697:b0:7a2:a1d:f0c6 with SMTP id af79cd13be357-7a9e5ee8684mr1038424885a.5.1726240709635; Fri, 13 Sep 2024 08:18:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726240709; cv=none; d=google.com; s=arc-20240605; b=cWaVUm4xdNfEujcoBy1+9wxNlCu0TmrIOVAr4QBWzwvT6zUBMHwbg7hhtqArlleKBE N+oIhZGZWKhZx05sW5NmnAEn8pGJqDpgtBVFGxrxgQ1jX4yN+lFV5obkcDswI9VYvIJX YlaxIrTh0mrboPd0922EuJxsTINENp3NqveoHurFmFdApccKOCslCwkYw/mnWnQDmanu W37EpRGcema+/84e+LS85TAT//N0R2ZsLQb5w6lIvXIhBtrQyQV0wLUKe/y+fJFg9hYg cSMfdZGfJZcEZWZvbd97spkuz1lroco7ODZGJc4ZH662crNNAf2zvrl3Bzpwm2wqErFD +xgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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:to:from :dkim-signature; bh=x+L6IQ+Q7ldy91T7HLv/CH8gFnEYSNt707sBQNeOJj8=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=Wm2mESKmSBlqNZ07+vUWjljdMqltrFeDzmGbPCJx+GiZVdbpqjI8XSplR9TvZx0MN6 tbahfFmJ8ur6+y/K5panHmqG7fEAU0jN3JuYlzZ8ueysClVkZcsWioFC0mC3RuGF4i+o 56a6wUtBWgqQi1Ge49a1Ulm3i8ROxebz+1sEMzgjzxXRB41S7lZk3mrGLChy5g+uTnp9 9WaBhwSkwfAdyfW6mejuqKFNuufPP9keo/xwuNP6bPSJWyG4CeAXWJCNcFrc21YxKgfG czdP9uSGHpK28hGUFQ2Ko8b1hI8p6u4ltChFKY90FUBup43ExdJWx2WnImDV6HPcGdv4 9Ddg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FrfvI5E0; 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 af79cd13be357-7a9a7a4afaesi1579111685a.508.2024.09.13.08.18.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Sep 2024 08:18:29 -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=FrfvI5E0; 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 1sp806-0001pM-9F; Fri, 13 Sep 2024 11:14: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 1sp802-0001ee-MR for qemu-devel@nongnu.org; Fri, 13 Sep 2024 11:14:18 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sp800-0007lT-N4 for qemu-devel@nongnu.org; Fri, 13 Sep 2024 11:14:18 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-42cb9a0c300so21173515e9.0 for ; Fri, 13 Sep 2024 08:14:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726240455; x=1726845255; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=x+L6IQ+Q7ldy91T7HLv/CH8gFnEYSNt707sBQNeOJj8=; b=FrfvI5E0m4Vev26ffpuPmoZXX1j8Xo1XdtxecIJw3lDe14DpOXDHMw7Lu3Bs2RlihT DVKF3m29dgbV8ri7wpCGcA4fiOTgFPo503ah0ZjhPNWdup6smf9PlsYVRPNLYiCe3Tvb cbaMiQsfLMB1zeMXUPwp1v35pzKaAzgL6n5rv5o+jYrpjvCudDJS7lZGZaPTcElYhyKe /9b1zLdVmGi+PCKGHchFpsAjTpYMWRCUtyM1aX7nGDOciU21WbsPsPZeiCc2AlAXkTch jre8iF6Vy7BMnBwEUIoD8J9i2lfw53zGQpPqxvvd+fQaxzZ3eMdoSnDV0cOEhIT5qLFW hbSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726240455; x=1726845255; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x+L6IQ+Q7ldy91T7HLv/CH8gFnEYSNt707sBQNeOJj8=; b=CLQ8eZpCCHsi+yVaPd6yXLiVKSz5lyc5nftLShGU+/tGzD3YOOgixnTWsokR0pu97u BUCh768f/RfCjiV7ax4Ua8CfzbT/K1nEonzToVoQBDG8q5TsGtyY5w2SVT5mhuUJTnHp ZE7axP7fkg5ta8stZP0bjYbaCsBRicCi3ugUsKB57chnvpwtSO+b1vPUW5XVPUurkgii z1o++XfgnDixk1hvGM0HuyJ7TSZZrQPmVOzPCFxlcIOPzpBqvqN+3NtDQftrgI3W3iS8 2AmuStjNjzw85KOuC4Mz7PwbQb/TFhrzOjPc+t90veonOrmHlausYvqzWv2qZHUb1MEk jJdg== X-Gm-Message-State: AOJu0YwdNNTTTH2y0pqoEGIONxYh3inVe0Sd6bM4Q2chHmGH5BQCAo+B FVObVib+c44//dMsc+tdnLfA9nh5a90BfPp6NlgZKHf7TatesOI3o82Q5SCjIj/tSriXzs9Z3kB L X-Received: by 2002:adf:f94f:0:b0:371:8e0d:c1d9 with SMTP id ffacd0b85a97d-378c2d07281mr4151089f8f.19.1726240454951; Fri, 13 Sep 2024 08:14:14 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42d9b16bfbfsm29152325e9.22.2024.09.13.08.14.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Sep 2024 08:14:14 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 04/27] hw: Remove device_class_set_parent_reset() Date: Fri, 13 Sep 2024 16:13:48 +0100 Message-Id: <20240913151411.2167922-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240913151411.2167922-1-peter.maydell@linaro.org> References: <20240913151411.2167922-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.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=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 Message-id: 20240830145812.1967042-5-peter.maydell@linaro.org --- 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)