From patchwork Mon Nov 6 06:57:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 741287 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp949101wrr; Sun, 5 Nov 2023 23:11:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IEUw0Wk8sSIaeQqcuNUy7i9TTHU1aZSbsMx+dgtJu1MQ0aRhOhF+RtsDAfE6MvOb27GsDKG X-Received: by 2002:a05:620a:2910:b0:773:f6ea:1f59 with SMTP id m16-20020a05620a291000b00773f6ea1f59mr12137094qkp.16.1699254681897; Sun, 05 Nov 2023 23:11:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699254681; cv=none; d=google.com; s=arc-20160816; b=gk0zcy88RLGDfMv1fZlqoRAUwWbSQ9L7aiTYUlVDb5dzMkNPUbAKZoVWZ/cQ9DVB4d U19UgrnCKWpWs2lVdxcQM4tNkTSApuqeh9VsPcN7aZCSdWkrwSXCb77PhKbaPnCvJq4+ 3BKU8gEmuNEMlXHFqiVN1iTBDgxqy8J6hFnxm59IQOs5gn5sr7jBG/7/Dxa+b+wb0xHu TQ961EtXRQ+PVWjste6fQmQENGR6olfK8ejijOu3PTZ5fHOmWNA1x7RPmK1jt8GVIqPn 8CacsOACYc5PJGQLndPgmKi5BYjyRytQLGTtNKgIa4z3toTzCoO2449oiY68HWZdXUJg sNSw== 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=CcCSJZtm5FNm+Vqe6T4fCpsxXN5Xn7N6xYLpXpl9d3A=; fh=U+hGNjcWZPeyLe2bTdTFM68h7FRptferheHiMMFpeys=; b=AODSSzopC6nolQM2m3CJKpfRqpJXOuEzH8357R3cB+eaVv+GTTopW56wHqUqmNZY9t dYn7JmtCqB1aP1Cz8EFAOSmES7lDj5P0VQLjVS9JAt+l+LnhyvF3PPdjnY/rg06Y1jJU Hp8cjlNMMvATghb/47nNv9hmUKQRbydimx3tNFGovS+vAVo/5848DqQahi3DxYlhMEKS qd5kswF6gm4S8/8aBSiRAjSsS4DH1W5rLkqnjcOEgFvlVdivJs8D8FDsvsXg6nK0JCVF Wn6WsYaU8Ky9T/PjakebPbaXPpKHbrlexcTyKg2m4KR0url3y+g56ANeWepeP+SneWkn CIGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EOVQq6uo; 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 w9-20020a05620a424900b007788b164320si3733904qko.624.2023.11.05.23.11.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Nov 2023 23:11: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=EOVQq6uo; 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 1qztZm-0004gl-CO; Mon, 06 Nov 2023 01:59:10 -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 1qztZR-0004Vu-2f for qemu-devel@nongnu.org; Mon, 06 Nov 2023 01:58:49 -0500 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qztZO-0001PE-U1 for qemu-devel@nongnu.org; Mon, 06 Nov 2023 01:58:48 -0500 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1cc30bf9e22so32847035ad.1 for ; Sun, 05 Nov 2023 22:58:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699253926; x=1699858726; 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=CcCSJZtm5FNm+Vqe6T4fCpsxXN5Xn7N6xYLpXpl9d3A=; b=EOVQq6uo9SwXubLgPz5g2Rrg1ILu+gBfpB6accsKwvxO8U6k8AGebvJgOCgMs7uiP6 HR7IKPqHxzZQmWr+Ic+ys+WbtWb6zFjbvOfyMruA+4cklJdSiojj+BruzE4ptbOWwvwU ZOFi6nelWjUVJTgSYiWwdvlgmvUTB1i2l1BfNVl4CIFcFYW+KTNSu9jAtFgJaz4J9QWD P+loFiH1clxvQXMuOmwmdtwU/B3+q2Sh95u9dXX9UXrI7SdOEsFJbcJIczKab0veQ2Tf oR1bVd+E8DNOH11IQ53G0pK2EkalEdrGUlkjmqbH15nMmzYvgX/6Up1qScBMm8RIUEGU MtLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699253926; x=1699858726; 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=CcCSJZtm5FNm+Vqe6T4fCpsxXN5Xn7N6xYLpXpl9d3A=; b=lWD7+XdS/WNNyz8lITTRAdbM9cra40b2kYr/r8uJ2L8P5OVXpRt+I6yBzZORAIUTjq a4t8UQK/iUofdY3H/FKu0sf7d/+XJDo9nZUviaDn6Q9iZKYW/DojeyJjQWlIM/ikagxN lbMLQ990+ZfJhq9LeIaCINaQHlh0hG27jhYngnrqvHsQKFXI66Q/yvrXUnA3ZMbOYYUj 2cIrs2Q+O4OyqoG04hHVhUUCMPePdrO9r6f36/vCXzEDTUl6DT92ZQLtW6WJabuFKU+g Qu6V92Ih5u56bWHBrfAI0imdlgg+TUQb96aAhbT9+cWEsC7pVYt4/IoLOCsTu8EDsVi+ REPA== X-Gm-Message-State: AOJu0YwypGZXJZjJjyx814KEmn6vTQLlxPrqga8l0bx2MQhsMl+3ZFkq 8/hyWp+95vlDw5bDvXsyIuNiqMQqk6qQEffumus= X-Received: by 2002:a17:902:d4d1:b0:1bc:1e17:6d70 with SMTP id o17-20020a170902d4d100b001bc1e176d70mr14495187plg.24.1699253925788; Sun, 05 Nov 2023 22:58:45 -0800 (PST) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id c3-20020a170902d48300b001c62e3e1286sm5167130plg.166.2023.11.05.22.58.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 22:58:45 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: quintela@redhat.com, peterx@redhat.com, farosas@suse.de, leobras@redhat.com Subject: [PATCH 19/71] hw/core: Constify VMState Date: Sun, 5 Nov 2023 22:57:35 -0800 Message-Id: <20231106065827.543129-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231106065827.543129-1-richard.henderson@linaro.org> References: <20231106065827.543129-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x635.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 Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- 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),