From patchwork Fri Dec 29 21:22:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 758806 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp4671274wrw; Fri, 29 Dec 2023 13:27:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IFi1sqrVP+TgBTjRNEq8dBl6W9Mezwj/9Wspa3r1AXjIqEuGxC7j5nSOjsRNKyTgH0/5BjL X-Received: by 2002:a05:620a:8501:b0:781:711e:5529 with SMTP id pe1-20020a05620a850100b00781711e5529mr2902067qkn.78.1703885237520; Fri, 29 Dec 2023 13:27:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703885237; cv=none; d=google.com; s=arc-20160816; b=TO3O3f8QvNc8DSMgyqDhIdgOBOxZugKQjQCA9/NB2eqS8QpgoPyOG9gIyuUYycnxG/ PjCdRFPi2a/zStu0CwKkHFLSdDZ2T1ylFBtt8I71+H7nibKP1oiwp+rgDGLfGEa4/5Ln Akyob2ingXM/7eUAeRHHAq1CrokBL7Nzhn/M60YX9lvilUNOOhgbG8lLdmR9VHAaX63u YrcOBd6LcO6dCp0h18bZ21EVlJA0nXKd+7xGAmUjBM82wJooT0fX3txoE3q0N7n8KVMN KNV9OAomvKUsFuIP8jVLGfGcoBQBeUS8pMhINR9UdLb1m+42xXmmpafqa0pUwb9v9/9l eSrw== 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=Qxy3UL4B8AxC1Jq+djISZlpE1zvXiAaDiE1NgzJw8Vw=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=h4evmAZLBJPAHHTodFtALrt5+vBaySznzEAF2nVgYk6s9k7Ni1dLZv5//4mpjH1Q1z V1mArytXpfjXqF32q+U8eY34OuEKIcITZ3GNl551hOF5J42xzOW2RrfwHMpVx7sG9z/L Cb5YfhW721ENwAudm4GVN2CBTl0ZfnfWbsGc04vPSgpNgd0zoX7/YrCtaSnj2VDy0mPN rfPDTwLHOK3TAXNcsc1UiiR0ABfA6mXoq4VKT6zW580EQzS732dYAGiEARJuDC0J8FhY mLicHkFd/E9udhOo8tmOoKeE7Q39eyqNAqtAlOzdugM9I+g0dqKo5tWDxT1DB9T/9jdK TX7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pwbKDwAv; 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 x7-20020a05620a258700b007817145f9a5si4865606qko.411.2023.12.29.13.27.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Dec 2023 13:27:17 -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=pwbKDwAv; 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 1rJKLS-0007DU-J9; Fri, 29 Dec 2023 16:24:42 -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 1rJKLR-0007CY-DG for qemu-devel@nongnu.org; Fri, 29 Dec 2023 16:24:41 -0500 Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rJKLP-0006nt-OE for qemu-devel@nongnu.org; Fri, 29 Dec 2023 16:24:41 -0500 Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-35fe8a4b311so26505195ab.1 for ; Fri, 29 Dec 2023 13:24:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703885078; x=1704489878; 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=Qxy3UL4B8AxC1Jq+djISZlpE1zvXiAaDiE1NgzJw8Vw=; b=pwbKDwAv09IDReFS3A3qDFioLgTbBEq1aeWA08NHlPGGL5JKW/7lyx0hXyfAcvtY0c qnr1Vh2PIbrKhq0YHexMIFX/BmEdYftDB7prcWMxfXwFtXC9g8dhxABMjdQSCgbWLrJl jAuQt+0ijF/rc6VXBS4kzr/XvTlDcUV9/SufNSYKPYc+/102k9RhbNDliwGqrk1pCKa1 QZYHt9+MEDSHLkdSNijIA5qYY4VYbsDiT5GA7r3G+s6EDwYcg+Lg9dvSI/NBdVjz4qAp uv/lmIlS04tJofQx3zcIXsAy36YjPCfzuEEREIQ3FAM4+dzcyWK0nN77aSMAlVMHGurx TJWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703885078; x=1704489878; 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=Qxy3UL4B8AxC1Jq+djISZlpE1zvXiAaDiE1NgzJw8Vw=; b=P1wrelpaChFhqn7p0McHS6rzvevm4EYR+/kJsy85qBocKiSzXSqJu6fnyOoKH5S7T3 IqpWEmp+ijvNXEmGgQI/wu3KYauNceOh05+Xdi3F+CQ/NOhDCU0MXVf6Xf+qofEREuDK r3uCKRPAu5uuVIVPbFTpWSrEBIkmpUoXVPfqsJuWgCpCauSevEP7XGe2/QFBjBGnYvgv QgQshdLBEhd8a0OXSic2tPmwO7iaLan4ZfHBoy6yBgTF3wY4/6aIkY5Gf84YXhYqyqwL NRux05QJycf6HQOT7oYu7y9uBCiBwX7Y8242hMTu4syc583JwfrucK0uLRK3C/9DmigR wZ7g== X-Gm-Message-State: AOJu0YwCW26z3S1kFghZ0gJEypuC2ymNbpRbI6Ut1tJevUUyzpVrtBEW xIu3iKIDVk9GUK255BgA0ux77jCBnhTipcWsjh3bfnrDoEsPWQ== X-Received: by 2002:a05:6e02:3004:b0:360:35f:55e8 with SMTP id bd4-20020a056e02300400b00360035f55e8mr10202260ilb.53.1703885078694; Fri, 29 Dec 2023 13:24:38 -0800 (PST) Received: from stoup.lan (203-217-28-32.perm.iinet.net.au. [203.217.28.32]) by smtp.gmail.com with ESMTPSA id a34-20020a631a22000000b005c65e82a0cbsm15016237pga.17.2023.12.29.13.24.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 13:24:38 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 19/71] hw/core: Constify VMState Date: Sat, 30 Dec 2023 08:22:54 +1100 Message-Id: <20231229212346.147149-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231229212346.147149-1-richard.henderson@linaro.org> References: <20231229212346.147149-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::134; envelope-from=richard.henderson@linaro.org; helo=mail-il1-x134.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 Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Message-Id: <20231221031652.119827-20-richard.henderson@linaro.org> --- hw/core/clock-vmstate.c | 6 +++--- hw/core/or-irq.c | 6 +++--- hw/core/ptimer.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/core/clock-vmstate.c b/hw/core/clock-vmstate.c index 7eccb6d4ea..e831fc596f 100644 --- a/hw/core/clock-vmstate.c +++ b/hw/core/clock-vmstate.c @@ -41,7 +41,7 @@ const VMStateDescription vmstate_muldiv = { .version_id = 1, .minimum_version_id = 1, .needed = muldiv_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(multiplier, Clock), VMSTATE_UINT32(divider, Clock), VMSTATE_END_OF_LIST() @@ -53,11 +53,11 @@ const VMStateDescription vmstate_clock = { .version_id = 0, .minimum_version_id = 0, .pre_load = clock_pre_load, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT64(period, Clock), VMSTATE_END_OF_LIST() }, - .subsections = (const VMStateDescription*[]) { + .subsections = (const VMStateDescription * const []) { &vmstate_muldiv, NULL }, diff --git a/hw/core/or-irq.c b/hw/core/or-irq.c index 1df4bc05a7..13907df026 100644 --- a/hw/core/or-irq.c +++ b/hw/core/or-irq.c @@ -94,7 +94,7 @@ static const VMStateDescription vmstate_or_irq_extras = { .version_id = 1, .minimum_version_id = 1, .needed = vmstate_extras_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_VARRAY_UINT16_UNSAFE(levels, OrIRQState, num_lines, 0, vmstate_info_bool, bool), VMSTATE_END_OF_LIST(), @@ -105,11 +105,11 @@ static const VMStateDescription vmstate_or_irq = { .name = TYPE_OR_IRQ, .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_BOOL_SUB_ARRAY(levels, OrIRQState, 0, OLD_MAX_OR_LINES), VMSTATE_END_OF_LIST(), }, - .subsections = (const VMStateDescription*[]) { + .subsections = (const VMStateDescription * const []) { &vmstate_or_irq_extras, NULL }, diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c index e03165febf..b1517592c6 100644 --- a/hw/core/ptimer.c +++ b/hw/core/ptimer.c @@ -441,7 +441,7 @@ const VMStateDescription vmstate_ptimer = { .name = "ptimer", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT8(enabled, ptimer_state), VMSTATE_UINT64(limit, ptimer_state), VMSTATE_UINT64(delta, ptimer_state),