From nobody Wed Nov 27 00:43:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1703128766; cv=none; d=zohomail.com; s=zohoarc; b=XwWfhh001WX+iOlzA4qBeRysTjiFx3Mbg5k/mKRHXH1RwOPoLiVyAaXjdQZsJa9pH//4QT00LoM2AT3lWvFC/tAHgKC/BLwfJYlC4U91MWxDMg2sC9jNZVwqshSAXZysTBZoYVDZAPLBiaRZjzQslyasSEGY1wpoZjo+z9/3GCo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703128766; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=BUPjulL37v9I3fbW6Ju3ECNP2BMc62r5u4umTa9wVZE=; b=badecYXbRK+erBlZEKFxxUih//J+ROCLTIRKmE6LFmEv+3l5ERnLjjfMLhePgTzLfVsWvw5ebsFc/X8lVw1dzh1lUioeP/N9UbCW7hVZLqfYeumBGM/uOSTICMQlSbJWjcUNSuGh+SiTgWsMOqb7Kpfy55t9lkzdYq9mIzLYOdc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1703128766637763.0129553986321; Wed, 20 Dec 2023 19:19:26 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rG9aB-0001bY-5K; Wed, 20 Dec 2023 22:18:47 -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 1rG9a8-0001U0-0x for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:18:45 -0500 Received: from mail-qv1-xf31.google.com ([2607:f8b0:4864:20::f31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rG9a5-0003xm-Kz for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:18:43 -0500 Received: by mail-qv1-xf31.google.com with SMTP id 6a1803df08f44-67f7da00237so1361026d6.2 for ; Wed, 20 Dec 2023 19:18:41 -0800 (PST) Received: from stoup.. ([172.58.139.164]) by smtp.gmail.com with ESMTPSA id n8-20020a05620a294800b0078116d55191sm360808qkp.130.2023.12.20.19.18.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 19:18:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703128720; x=1703733520; 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=BUPjulL37v9I3fbW6Ju3ECNP2BMc62r5u4umTa9wVZE=; b=sLiqHNLQbqXowTEcwz2xKtIyxrPx4NwtA6Wyg/GWVIPnKVoDuG4JaIiHfEuVHGkGle +3BntLPhaElSUf7YIpz7q2ty6yQDQ+doKh0hQ+4U/xIIewaXWBshLmRXafUkl5lre5I5 btCcSX/AsE/XsrLQN3YkXI9kKiYguMJ2rXT6Hdi6+Qzvq7IJNRhVkLPuSXxbBsfAwtgh EULHomF0GLL7peOg616jcsLaRfbd7EvgI2u5NyAlu4Zu6x03L0vHR1mKUUhKj2bEhKUq BO55TPBii5l48wnEYv4CPn/LVpzjtBuWWmdl2F7S7/POZ90dPBKk+hEB1yCmKjEw10+J qaDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703128720; x=1703733520; 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=BUPjulL37v9I3fbW6Ju3ECNP2BMc62r5u4umTa9wVZE=; b=tczlR10V2txjoh8Pnv4KCGNhT82P3kEsfIJn8w3Z9f+XKB73StdY3SgKZX6IOqKRd0 Ue74S3/UeiajvLQmZTbZ/my6wSPxrRu7W58r/7Oz434qcpZw9b+VJPA8HRFoLe4jqkFY TMqCcSBew86V6GG/SN+7/nbNiWd4o88dBDKSolwdMjK5ZCKEIBzRnpxUB66BglOkGQsA B/8zRhr9W95A5doSO88pnqZqr7aeoRllrX9fe+ZqGTRjbb07UaM0KlpK6lFB+ek5nfYT DqC/er7m37htJsFZiOT1udITFfY3aFeaKhnUzgSqSyEePS3O6gMdxpcxbEwa/rBz2tkz PzyQ== X-Gm-Message-State: AOJu0YyK5djiSNDM/3nJ2dP9GR4PMI4yDB8qTh5T7FWR/Sjcxbnq5RlC yEUXRi+sfYod9Qg3PTkqyBNhgmdo4JZJFMYxZhXY9/K1 X-Google-Smtp-Source: AGHT+IHDjXokRZ8J1Jpt2xan/fwe2tUGqqmiU/8TUzT8YdWXjNrrlBAmmh4dzkbi+kCv8KGaekRk9g== X-Received: by 2002:a05:6214:1310:b0:67a:a721:ec0f with SMTP id pn16-20020a056214131000b0067aa721ec0fmr19188347qvb.83.1703128720497; Wed, 20 Dec 2023 19:18:40 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 23/71] hw/audio: Constify VMState Date: Thu, 21 Dec 2023 14:16:04 +1100 Message-Id: <20231221031652.119827-24-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::f31; envelope-from=richard.henderson@linaro.org; helo=mail-qv1-xf31.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1703128767496100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- hw/audio/ac97.c | 4 ++-- hw/audio/asc.c | 4 ++-- hw/audio/cs4231.c | 2 +- hw/audio/cs4231a.c | 2 +- hw/audio/es1370.c | 4 ++-- hw/audio/gus.c | 2 +- hw/audio/hda-codec.c | 8 ++++---- hw/audio/intel-hda.c | 4 ++-- hw/audio/lm4549.c | 2 +- hw/audio/marvell_88w8618.c | 2 +- hw/audio/pcspk.c | 2 +- hw/audio/pl041.c | 8 ++++---- hw/audio/sb16.c | 2 +- hw/audio/virtio-snd.c | 2 +- hw/audio/wm8750.c | 2 +- 15 files changed, 25 insertions(+), 25 deletions(-) diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c index 6a7a2dc80c..3f0053f94d 100644 --- a/hw/audio/ac97.c +++ b/hw/audio/ac97.c @@ -1094,7 +1094,7 @@ static const VMStateDescription vmstate_ac97_bm_regs = =3D { .name =3D "ac97_bm_regs", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(bdbar, AC97BusMasterRegs), VMSTATE_UINT8(civ, AC97BusMasterRegs), VMSTATE_UINT8(lvi, AC97BusMasterRegs), @@ -1142,7 +1142,7 @@ static const VMStateDescription vmstate_ac97 =3D { .version_id =3D 3, .minimum_version_id =3D 2, .post_load =3D ac97_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_PCI_DEVICE(dev, AC97LinkState), VMSTATE_UINT32(glob_cnt, AC97LinkState), VMSTATE_UINT32(glob_sta, AC97LinkState), diff --git a/hw/audio/asc.c b/hw/audio/asc.c index 0f36b4ce9b..87b5624326 100644 --- a/hw/audio/asc.c +++ b/hw/audio/asc.c @@ -555,7 +555,7 @@ static const VMStateDescription vmstate_asc_fifo =3D { .name =3D "apple-sound-chip.fifo", .version_id =3D 0, .minimum_version_id =3D 0, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8_ARRAY(fifo, ASCFIFOState, ASC_FIFO_SIZE), VMSTATE_UINT8(int_status, ASCFIFOState), VMSTATE_INT32(cnt, ASCFIFOState), @@ -575,7 +575,7 @@ static const VMStateDescription vmstate_asc =3D { .version_id =3D 0, .minimum_version_id =3D 0, .post_load =3D asc_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_STRUCT_ARRAY(fifos, ASCState, 2, 0, vmstate_asc_fifo, ASCFIFOState), VMSTATE_UINT8_ARRAY(regs, ASCState, ASC_REG_SIZE), diff --git a/hw/audio/cs4231.c b/hw/audio/cs4231.c index aefc3edea1..967caa7fcb 100644 --- a/hw/audio/cs4231.c +++ b/hw/audio/cs4231.c @@ -142,7 +142,7 @@ static const VMStateDescription vmstate_cs4231 =3D { .name =3D"cs4231", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32_ARRAY(regs, CSState, CS_REGS), VMSTATE_UINT8_ARRAY(dregs, CSState, CS_DREGS), VMSTATE_END_OF_LIST() diff --git a/hw/audio/cs4231a.c b/hw/audio/cs4231a.c index 3aa105748d..9ef57f042d 100644 --- a/hw/audio/cs4231a.c +++ b/hw/audio/cs4231a.c @@ -637,7 +637,7 @@ static const VMStateDescription vmstate_cs4231a =3D { .minimum_version_id =3D 1, .pre_load =3D cs4231a_pre_load, .post_load =3D cs4231a_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32_ARRAY (regs, CSState, CS_REGS), VMSTATE_BUFFER (dregs, CSState), VMSTATE_INT32 (dma_running, CSState), diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c index fad5541211..4ab61d3b9d 100644 --- a/hw/audio/es1370.c +++ b/hw/audio/es1370.c @@ -765,7 +765,7 @@ static const VMStateDescription vmstate_es1370_channel = =3D { .name =3D "es1370_channel", .version_id =3D 2, .minimum_version_id =3D 2, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32 (shift, struct chan), VMSTATE_UINT32 (leftover, struct chan), VMSTATE_UINT32 (scount, struct chan), @@ -808,7 +808,7 @@ static const VMStateDescription vmstate_es1370 =3D { .version_id =3D 2, .minimum_version_id =3D 2, .post_load =3D es1370_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_PCI_DEVICE (dev, ES1370State), VMSTATE_STRUCT_ARRAY (chan, ES1370State, NB_CHANNELS, 2, vmstate_es1370_channel, struct chan), diff --git a/hw/audio/gus.c b/hw/audio/gus.c index 6c2b586ca7..4beb3fd74e 100644 --- a/hw/audio/gus.c +++ b/hw/audio/gus.c @@ -209,7 +209,7 @@ static const VMStateDescription vmstate_gus =3D { .name =3D "gus", .version_id =3D 2, .minimum_version_id =3D 2, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_INT32 (pos, GUSState), VMSTATE_INT32 (left, GUSState), VMSTATE_INT32 (shift, GUSState), diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index 0bc20d49f6..b22e486fda 100644 --- a/hw/audio/hda-codec.c +++ b/hw/audio/hda-codec.c @@ -812,7 +812,7 @@ static const VMStateDescription vmstate_hda_audio_strea= m_buf =3D { .name =3D "hda-audio-stream/buffer", .version_id =3D 1, .needed =3D vmstate_hda_audio_stream_buf_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_BUFFER(buf, HDAAudioStream), VMSTATE_INT64(rpos, HDAAudioStream), VMSTATE_INT64(wpos, HDAAudioStream), @@ -825,7 +825,7 @@ static const VMStateDescription vmstate_hda_audio_strea= m_buf =3D { static const VMStateDescription vmstate_hda_audio_stream =3D { .name =3D "hda-audio-stream", .version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(stream, HDAAudioStream), VMSTATE_UINT32(channel, HDAAudioStream), VMSTATE_UINT32(format, HDAAudioStream), @@ -837,7 +837,7 @@ static const VMStateDescription vmstate_hda_audio_strea= m =3D { VMSTATE_BUFFER(compat_buf, HDAAudioStream), VMSTATE_END_OF_LIST() }, - .subsections =3D (const VMStateDescription * []) { + .subsections =3D (const VMStateDescription * const []) { &vmstate_hda_audio_stream_buf, NULL } @@ -847,7 +847,7 @@ static const VMStateDescription vmstate_hda_audio =3D { .name =3D "hda-audio", .version_id =3D 2, .post_load =3D hda_audio_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_STRUCT_ARRAY(st, HDAAudioState, 4, 0, vmstate_hda_audio_stream, HDAAudioStream), diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c index 78ff9f9a68..9c54e60b71 100644 --- a/hw/audio/intel-hda.c +++ b/hw/audio/intel-hda.c @@ -1158,7 +1158,7 @@ static int intel_hda_post_load(void *opaque, int vers= ion) static const VMStateDescription vmstate_intel_hda_stream =3D { .name =3D "intel-hda-stream", .version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(ctl, IntelHDAStream), VMSTATE_UINT32(lpib, IntelHDAStream), VMSTATE_UINT32(cbl, IntelHDAStream), @@ -1174,7 +1174,7 @@ static const VMStateDescription vmstate_intel_hda =3D= { .name =3D "intel-hda", .version_id =3D 1, .post_load =3D intel_hda_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_PCI_DEVICE(pci, IntelHDAState), =20 /* registers */ diff --git a/hw/audio/lm4549.c b/hw/audio/lm4549.c index e7bfcc4b9f..a4a77c8dc6 100644 --- a/hw/audio/lm4549.c +++ b/hw/audio/lm4549.c @@ -329,7 +329,7 @@ const VMStateDescription vmstate_lm4549_state =3D { .version_id =3D 1, .minimum_version_id =3D 1, .post_load =3D lm4549_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(voice_is_active, lm4549_state), VMSTATE_UINT16_ARRAY(regfile, lm4549_state, 128), VMSTATE_UINT16_ARRAY(buffer, lm4549_state, LM4549_BUFFER_SIZE), diff --git a/hw/audio/marvell_88w8618.c b/hw/audio/marvell_88w8618.c index e6c09bdb8e..cc285444bc 100644 --- a/hw/audio/marvell_88w8618.c +++ b/hw/audio/marvell_88w8618.c @@ -273,7 +273,7 @@ static const VMStateDescription mv88w8618_audio_vmsd = =3D { .name =3D "mv88w8618_audio", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(playback_mode, mv88w8618_audio_state), VMSTATE_UINT32(status, mv88w8618_audio_state), VMSTATE_UINT32(irq_enable, mv88w8618_audio_state), diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c index fe7f07ced2..a4b89f1768 100644 --- a/hw/audio/pcspk.c +++ b/hw/audio/pcspk.c @@ -208,7 +208,7 @@ static const VMStateDescription vmstate_spk =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D migrate_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(data_on, PCSpkState), VMSTATE_UINT8(dummy_refresh_clock, PCSpkState), VMSTATE_END_OF_LIST() diff --git a/hw/audio/pl041.c b/hw/audio/pl041.c index 868dffbfd3..b435208c24 100644 --- a/hw/audio/pl041.c +++ b/hw/audio/pl041.c @@ -571,7 +571,7 @@ static const VMStateDescription vmstate_pl041_regfile = =3D { .name =3D "pl041_regfile", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { #define REGISTER(name, offset) VMSTATE_UINT32(name, pl041_regfile), #include "pl041.hx" #undef REGISTER @@ -583,7 +583,7 @@ static const VMStateDescription vmstate_pl041_fifo =3D { .name =3D "pl041_fifo", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(level, pl041_fifo), VMSTATE_UINT32_ARRAY(data, pl041_fifo, MAX_FIFO_DEPTH), VMSTATE_END_OF_LIST() @@ -594,7 +594,7 @@ static const VMStateDescription vmstate_pl041_channel = =3D { .name =3D "pl041_channel", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_STRUCT(tx_fifo, pl041_channel, 0, vmstate_pl041_fifo, pl041_fifo), VMSTATE_UINT8(tx_enabled, pl041_channel), @@ -613,7 +613,7 @@ static const VMStateDescription vmstate_pl041 =3D { .name =3D "pl041", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(fifo_depth, PL041State), VMSTATE_STRUCT(regs, PL041State, 0, vmstate_pl041_regfile, pl041_regfile), diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c index 18f6d252db..bf7f35a42b 100644 --- a/hw/audio/sb16.c +++ b/hw/audio/sb16.c @@ -1324,7 +1324,7 @@ static const VMStateDescription vmstate_sb16 =3D { .version_id =3D 1, .minimum_version_id =3D 1, .post_load =3D sb16_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32 (irq, SB16State), VMSTATE_UINT32 (dma, SB16State), VMSTATE_UINT32 (hdma, SB16State), diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 137fa77a01..ea2aeaef14 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c @@ -72,7 +72,7 @@ static const VMStateDescription vmstate_virtio_snd =3D { .unmigratable =3D 1, .minimum_version_id =3D VIRTIO_SOUND_VM_VERSION, .version_id =3D VIRTIO_SOUND_VM_VERSION, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_VIRTIO_DEVICE, VMSTATE_END_OF_LIST() }, diff --git a/hw/audio/wm8750.c b/hw/audio/wm8750.c index 57954a6314..ec2c4e1374 100644 --- a/hw/audio/wm8750.c +++ b/hw/audio/wm8750.c @@ -592,7 +592,7 @@ static const VMStateDescription vmstate_wm8750 =3D { .minimum_version_id =3D 0, .pre_save =3D wm8750_pre_save, .post_load =3D wm8750_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8_ARRAY(i2c_data, WM8750State, 2), VMSTATE_INT32(i2c_len, WM8750State), VMSTATE_INT32(enable, WM8750State), --=20 2.34.1