From patchwork Thu Dec 21 03:16:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 756929 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp686934wrw; Wed, 20 Dec 2023 19:22:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYch+gtMU0iIiinGKkyw39YXGjXzrRQaJ0RlvT9mSHGIiPWVNNdhDhtZR73QVTNSsthoDf X-Received: by 2002:a05:622a:174a:b0:427:8ff9:39a7 with SMTP id l10-20020a05622a174a00b004278ff939a7mr1938512qtk.131.1703128963204; Wed, 20 Dec 2023 19:22:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703128963; cv=none; d=google.com; s=arc-20160816; b=pBTjTE0xdfyJXFLHdjqe3i5F09siKNOTDUQffDb0SmwwWnxmmofKpKxrDRz+7DIbtR /mFyAOuqll/sbkpw46WA1YFnKLpPthmbywHsSeJyNRL8RBTGeun4z2ZXMzcyJ0bbqn7t LGWj8O2xleckyrjuNRsqvHib2BZD+MlVq04u9GDf4gQgrVLtrXX68VpDDhsbAS/ZNre2 L4slEdc5i4f3a7bUw/OLvXCHcajaEwcRKJehM1Wan1ntrHj3lxCDsDV9u6ooeTTyuOW+ 1m15LljFXdUxa6fO9YRVuCjUAUOgKEzIRvr89dAm2U2aK4ibCTFgi0jyDzOHjDmNTcO1 FTDQ== 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=55GqNzFzxTGLqp8I3PrV1yIkLTAvTwTk9yNDaqit+JA=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=uSZNWI2LcKR7d4h+15bwrl+6+ZH3muavMl3z90ly6oqZx6Q4SqQdaNnMMwYclyNYx8 9piTcNWbiPlIUV307iDBkH98iMpmFLt/rrreIIa+H6FVqSXDelciY26CayaM42fpsUiy IdzKnIdKvPRlWKuCrplkiDQnq3QZQ2cbHFV/lvUZzHSvRUtWZFZe3Idg8ezTAukQhyZX 6oz/WSpSQVGb/nooMY6K9XR3KZnpYsPi+lt4PTrurdX2EleVD5H2r01IqOelaP7XPKaD 6i9Dx3nuWxv6vw3VKh+/Jo3jOJEIY5kgaNh39/Ay2Q26uuPiSZjBkTmbN/ZE9gSPIggX UP0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x2MMovML; 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 o13-20020a05622a044d00b00425814dac1asi1160035qtx.246.2023.12.20.19.22.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Dec 2023 19:22:43 -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=x2MMovML; 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 1rG9Zt-0008Dl-4C; Wed, 20 Dec 2023 22:18:29 -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 1rG9Zr-00087d-5q for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:18:27 -0500 Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rG9Zp-0003tB-FK for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:18:26 -0500 Received: by mail-qk1-x731.google.com with SMTP id af79cd13be357-7810917125bso19413085a.2 for ; Wed, 20 Dec 2023 19:18:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703128704; x=1703733504; 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=55GqNzFzxTGLqp8I3PrV1yIkLTAvTwTk9yNDaqit+JA=; b=x2MMovMLgKXksOpgoZ9h7hXEApLunbk2Gfb/YbONG8WBACU4VynMzOjq44+VUJHW9I iLFydvUKlLI6cMlVhFxoLHlb/7MlKLGRqDqvxjP0nruUs7R9gjqblMQFLg6d68L/pxds jRLDyRICCC5p/K6l5PuEvWVOqR3DJadc1VD8CwjNYzgsMRvQlmhXYlSQbG45SI3GOln+ i6/rAi9GLleq5zGR8vb/EtABzSVUF2pJr5cejXDLo/+0iBt90h5IA8jaWsUabus4Nnow VTAAKSO6ViuFDdneN5Qs0xgeVy1hTKUicS2merzTRFstjMbqGSmqlOKdpqhdInStKG2a rlNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703128704; x=1703733504; 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=55GqNzFzxTGLqp8I3PrV1yIkLTAvTwTk9yNDaqit+JA=; b=oSDiFC6WrILMi89nSwg7X89R5aFYtuBGe+FbFPiic1ZfEQkTxUJwjaTlKRPB2IrF71 wAwhHribom2BY+/Jqn/LLaTXtJ0hziq1bUWajnvq2fc2kIKfvS6bFhuqryuoo+eNAbwH GtnH8BpvS+sdWEAex5aYv4lLo9E6m8Kfrvd3KUvmGoIfNBJhu/CpWdwzVLUimrMUoTV5 I0I0oGhMrsw/8S8UDKDpj0h1dDukmlpDjziBUeiX5eTDpe/goIdd/dopr2PEujSo0EFh IFHXbdWjUfGeU5G7q3rotQKjwfoJOYcAe1D+jKlF5ov0IHSeFB+vdzzq5j06mNAMNg8p qIoA== X-Gm-Message-State: AOJu0Yw1/nt2Cd0Iwm72qNPsGS0WnIc3d41y2viA8/SXuNSLep4KMzHt BxuRVkqR0CofbChAc+PZOeF9rS0XM1S7Y8asXlw088lN X-Received: by 2002:a05:620a:278b:b0:77e:fba3:4f29 with SMTP id g11-20020a05620a278b00b0077efba34f29mr26030143qkp.127.1703128704710; Wed, 20 Dec 2023 19:18:24 -0800 (PST) Received: from stoup.. ([172.58.139.164]) by smtp.gmail.com with ESMTPSA id n8-20020a05620a294800b0078116d55191sm360808qkp.130.2023.12.20.19.18.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 19:18:24 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 19/71] hw/core: Constify VMState Date: Thu, 21 Dec 2023 14:16:00 +1100 Message-Id: <20231221031652.119827-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231221031652.119827-1-richard.henderson@linaro.org> References: <20231221031652.119827-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::731; envelope-from=richard.henderson@linaro.org; helo=mail-qk1-x731.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 --- 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),