From patchwork Fri Aug 30 14:58:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 824006 Delivered-To: patch@linaro.org Received: by 2002:a5d:48c1:0:b0:367:895a:4699 with SMTP id p1csp823506wrs; Fri, 30 Aug 2024 07:59:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXv4SbVzJEOOGYoUDYp9thSpcRMWNic5AK5VTPEeVpglGUhKTwrRfIVMK0gw8wTPmUIi6JXuA==@linaro.org X-Google-Smtp-Source: AGHT+IE3pRV3pIoQ9hpRAmtGELmynevQ11CJPR//IL24SqurCzV8DhxhcjhtGrjJav2JzYB3OQtP X-Received: by 2002:a05:6214:5f08:b0:6bf:7981:661c with SMTP id 6a1803df08f44-6c33e6a6394mr84722446d6.53.1725029944197; Fri, 30 Aug 2024 07:59:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725029944; cv=none; d=google.com; s=arc-20160816; b=sJuj84XiKNajx1rdY5hHVfqfSVsFkr+5XlLQhg18QQcoCjiXwalisOvnIohd5aZL6W 1klRFDfonLH7X1uCZ8c3JjDawjfAer66GFevJ0XaazVBI1RBIUtyFTfEZxKIiQ6kx52F C9UrxULrN5Id5pBTzu+Fv1UV4PJS+SOcR7uS1URgRnM5y/WuhoydL2Il1UkDl2Ol8I2H Q4OseOuezpJLSlzMfeKTXlEGbfJiGch2BnAFwmQQ6CKb8l1+HM7nBDqWsxErwDgczj5e 9HxXn2SRoRCWcS0geUGHLAD7y6R3pI16bPeWNqKRZqsIwmVzQ+fmvyc94DC9RNPO+wJ+ dTmQ== 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=02NYsaWjTE0HD7Iy06E7IV0uEshqvGP6CcKE1OqfJzs=; fh=aZP5QcqmVCTfLe93cJ47kfqkp9RGJPPxVVJ3kRoWYP4=; b=nhdqHOPyqUlGOPHd+8t7vbgzef+CmOnakYS/VjmfCDk3LLpQ7PU/e/l3EuUgGxugRJ bLTDT+a06hf3XDdlvzS95hUXB4Cumv92ww2SRzqvU+c3DUeU6g7jBc85tic/bMEeAFF7 tSybnCCH3X6cyEU6MRdscH8FVv0ipkS0uO7pXFgSpkVIE/BYYbM6L5AFW/dlraW76VLk X7quLCklilnXiSZRnEUEv3ECsL+70BkkAbPAATz2dNVf6/vFz71c+LLWzyJliF2/s6oq 5mwgPprlovrloOcdX3WFkF3wmRxucshKjoxB9oHLdbS2eyy5FxZ+6D6qhNBGxScAkywc RMEw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="EJXsW5/f"; 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 6a1803df08f44-6c34c0409efsi13118406d6.172.2024.08.30.07.59.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Aug 2024 07:59:04 -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="EJXsW5/f"; 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 1sk34z-00057l-DH; Fri, 30 Aug 2024 10:58:25 -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 1sk34x-00051e-PI for qemu-devel@nongnu.org; Fri, 30 Aug 2024 10:58:23 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sk34v-0004bW-NV for qemu-devel@nongnu.org; Fri, 30 Aug 2024 10:58:23 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-374ba78f192so152651f8f.3 for ; Fri, 30 Aug 2024 07:58:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725029900; x=1725634700; 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=02NYsaWjTE0HD7Iy06E7IV0uEshqvGP6CcKE1OqfJzs=; b=EJXsW5/fLNetpNqj0+rMIlPI1egMHZnAk/VUId8qQ0QjQ3ij7RBc8NWocKyBl3KJJf 2ZLLLgRQSj9hj4GvoO6wpJi1FxCleMSkuuRC/XHmejF0RaXWjGyW5YwdXvD25gq01Ae2 olDcBagR1ftLqVQycQMsniN6s1CMAZXdQFxFE1O/8H1wSv89tQ8pIYsepUJEmS8P+XfX kWktSu0ABM1T9S7WlKupDK3+hQnmCDUVhArn2b0kLvcLiN3HgPsLareCUZ7h4kwhPwom oZ20TpQ7X85oLcJhEYh6BJnR5lUjFerbl7LFKg0aukUhnHW6XDakhNZh1ZyvuJrGLCql LRTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725029900; x=1725634700; 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=02NYsaWjTE0HD7Iy06E7IV0uEshqvGP6CcKE1OqfJzs=; b=KmNxWZ33na2MG7IRMNXg5rv3cBzjQQBkgEWmiKZNyhqvsCMZ7bMyh89ipZlM76chFd 6WeD8B2a7pNqyyJq9uxBjQs9jRN1wzFssoLGSG/bGPJ4Z7L5uQHzhAK7fQqV8rmtYVHs Z7uYREXyAeJ2URJCNzB4c4m18HFBxxHuIOF9YRPRi/K2EK2zOtSORPhKicavOxareqkH 8/nFNEXY9ZBncyHuhM18TzJApsyYXE+urnQdlZxNy0MWYyDM7OPLaN8B2PJ6OhlNdWUS WPeQaR+bo6wAnLkYkvuMxqhc7NWfSS6XncOVOu1SX/uO+S/ovQfrhqIv/vmYPP4xnFEw I+5w== X-Gm-Message-State: AOJu0Yx1fu/D0NVYK8uAG2Zjg474RPFd1L2iB7uXYFIT3xzkRtwGWNkF 9B/rpfhKu40V0cZnPx4Dc0PwxmjgOE7P8wk+TQVDWkHxwLBkUKyuZN/zX8DPUPrxgtI9jFUK7a0 i X-Received: by 2002:a05:6000:402a:b0:368:37d5:3f2e with SMTP id ffacd0b85a97d-3749b54d465mr5537966f8f.32.1725029900053; Fri, 30 Aug 2024 07:58:20 -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.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2024 07:58:19 -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 08/11] hw: Rename DeviceClass::reset field to legacy_reset Date: Fri, 30 Aug 2024 15:58:09 +0100 Message-Id: <20240830145812.1967042-9-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::429; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x429.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=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 Rename the DeviceClass::reset field to legacy_reset; this is helpful both in flagging up that it's best not used in new code and in making it easy to search for where it's being used still. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/hw/qdev-core.h | 4 ++-- hw/core/qdev.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index ade85c31e05..aa97c34a4be 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -152,14 +152,14 @@ struct DeviceClass { /* callbacks */ /** - * @reset: deprecated device reset method pointer + * @legacy_reset: deprecated device reset method pointer * * Modern code should use the ResettableClass interface to * implement a multi-phase reset. * * TODO: remove once every reset callback is unused */ - DeviceReset reset; + DeviceReset legacy_reset; DeviceRealize realize; DeviceUnrealize unrealize; diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 17423a9f573..460114609b0 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -776,8 +776,8 @@ static void device_transitional_reset(Object *obj) * devices) or a device's specific method for not-yet transitioned devices. * In both case, it does not reset children. */ - if (dc->reset) { - dc->reset(DEVICE(obj)); + if (dc->legacy_reset) { + dc->legacy_reset(DEVICE(obj)); } } @@ -788,7 +788,7 @@ static void device_transitional_reset(Object *obj) static ResettableTrFunction device_get_transitional_reset(Object *obj) { DeviceClass *dc = DEVICE_GET_CLASS(obj); - if (dc->reset != device_phases_reset) { + if (dc->legacy_reset != device_phases_reset) { /* * dc->reset has been overridden by a subclass, * the device is not ready for multi phase yet. @@ -846,7 +846,7 @@ static void device_class_init(ObjectClass *class, void *data) void device_class_set_legacy_reset(DeviceClass *dc, DeviceReset dev_reset) { - dc->reset = dev_reset; + dc->legacy_reset = dev_reset; } void device_class_set_parent_realize(DeviceClass *dc,