From nobody Wed Nov 27 11:37: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=1699254733; cv=none; d=zohomail.com; s=zohoarc; b=GfyxIVsEe5B/88R20uHo6fvfbZLOY4L+2c+NKAvsLdmcRhVIRfw9EhrltwU9KPIYonCRzCKUevPPRJCJmu1sg1dDXmfZbkCmcCbT0zwXgWQuL6iUm9JEq+ZktmMVMlFjQ2tDo4rwyKRoCskDeOJP+ClRqO6LBvSKYDaytkhLa6k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699254733; h=Content-Transfer-Encoding:Cc:Cc: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; bh=p9DLrTalTcJndhqqHcqb+nLiTVX9/SlM1pEgjvYTilk=; b=UPACNr3os9gxZqqEjIBk3VfhV+d3ahDNug3L8JHjQYZaNg9DDs+bseYcTk4JXOyP+LtIEszZc7I9VlnqLrEeNcZAtvj6L/KIiOwfp1K/h0r5KOPQEyDmdZp4qDKRdkiwHouDlVgx1J65sv8REgRWjgo3VvRvyxVhU/z+MGvjaYc= 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 1699254733773309.07244009204317; Sun, 5 Nov 2023 23:12:13 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qzta4-0005HR-Kp; Mon, 06 Nov 2023 01:59:28 -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 1qztZW-0004XM-KX for qemu-devel@nongnu.org; Mon, 06 Nov 2023 01:58:54 -0500 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qztZT-0001QM-IO for qemu-devel@nongnu.org; Mon, 06 Nov 2023 01:58:54 -0500 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1cc30bf9e22so32847245ad.1 for ; Sun, 05 Nov 2023 22:58:50 -0800 (PST) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id c3-20020a170902d48300b001c62e3e1286sm5167130plg.166.2023.11.05.22.58.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 22:58:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699253930; x=1699858730; 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=p9DLrTalTcJndhqqHcqb+nLiTVX9/SlM1pEgjvYTilk=; b=KATRN1nWW7isQQKe09KIZ7NUhdZ0urBnalx8MpwY4pBKmyZ+zA/K+ObtvC/WJLgrW5 4EhhLKar2zdZLzSXJtiZUuQxB3EMrBgGkv1vLPjkSvhHv2aOYrBE77A0jKzqZgYdxP2m ZmEpI0TvZgqvBmprBHGmb2hhnbZtsgCr9uTFBc17Bt5Xz+rLhlZFEOegxMP5nOKoHNwf DJbDoOcbQFOWDU0XyxQ00f+kuSlqrGYhlpHke0KW27cqaSFv3okS+n42a0J6ZZORaFjQ ZbTdH2isu0EO0WZMccQfK7nY03pjXMIbnouJilTSzhYyBEBLDQ/FDHIA5l/BNVaCzh3h vJMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699253930; x=1699858730; 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=p9DLrTalTcJndhqqHcqb+nLiTVX9/SlM1pEgjvYTilk=; b=gWaZfuFT2bInX9SYK5yXHL/cwlTxjzRq/mZVQmrpndhFw3c6IyTx4sr7IfgUyY+K6w 1cqXjYeYxQHAFF/4p4NRJMdqpKf5OukHSea3Avuhn3bPpbCYvfAbQB9aZCILN62HaHmF RR7GeMb8ba/dFJm9VdD+wgxcpvu9l/WNXgZt7zz2eVX7UvKSCEgEJtW/FsuawUQ3c/2u XVwf13yCdbWclVb09jbREvI/VsLU2MC56c4qZbjML1BsKjvQnZAg6rDE2dM3zRiqwKAo yZpgTrncQPM8JMIjX1VkxwtVBuJ8IFM4l30n7M/Oot2dQ1RksItVE6Ai2WaKB9QXq8KW nh4g== X-Gm-Message-State: AOJu0YxZCGnYpj4KesQiJ8H0v99eTmT7YrnyDZEXwBRlv1C19ujMu4Ku SWvTSF26SYlRM6G1/bN7dKGvY5Yog7JseJtm7Uo= X-Google-Smtp-Source: AGHT+IHzcjPtvl+6HR7dJkQj5PZUUb9sGyR8lyqMdsue1iJkKourFXm1hAEFS8GqK/ZDSGXJ+JrqvQ== X-Received: by 2002:a17:902:c412:b0:1cc:5ce4:f64b with SMTP id k18-20020a170902c41200b001cc5ce4f64bmr14349756plk.8.1699253929947; Sun, 05 Nov 2023 22:58:49 -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 24/71] hw/block: Constify VMState Date: Sun, 5 Nov 2023 22:57:40 -0800 Message-Id: <20231106065827.543129-25-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 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::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.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: 1699254737247100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- hw/block/ecc.c | 2 +- hw/block/fdc-isa.c | 2 +- hw/block/fdc-sysbus.c | 2 +- hw/block/fdc.c | 20 ++++++++++---------- hw/block/m25p80.c | 12 ++++++------ hw/block/nand.c | 2 +- hw/block/onenand.c | 2 +- hw/block/pflash_cfi01.c | 2 +- hw/block/swim.c | 6 +++--- hw/block/vhost-user-blk.c | 2 +- hw/block/virtio-blk.c | 2 +- 11 files changed, 27 insertions(+), 27 deletions(-) diff --git a/hw/block/ecc.c b/hw/block/ecc.c index 6e0d63842c..ed889a4184 100644 --- a/hw/block/ecc.c +++ b/hw/block/ecc.c @@ -82,7 +82,7 @@ const VMStateDescription vmstate_ecc_state =3D { .name =3D "ecc-state", .version_id =3D 0, .minimum_version_id =3D 0, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(cp, ECCState), VMSTATE_UINT16_ARRAY(lp, ECCState, 2), VMSTATE_UINT16(count, ECCState), diff --git a/hw/block/fdc-isa.c b/hw/block/fdc-isa.c index 7ec075e470..ad0921c7d3 100644 --- a/hw/block/fdc-isa.c +++ b/hw/block/fdc-isa.c @@ -259,7 +259,7 @@ static const VMStateDescription vmstate_isa_fdc =3D { .name =3D "fdc", .version_id =3D 2, .minimum_version_id =3D 2, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_STRUCT(state, FDCtrlISABus, 0, vmstate_fdc, FDCtrl), VMSTATE_END_OF_LIST() } diff --git a/hw/block/fdc-sysbus.c b/hw/block/fdc-sysbus.c index 86ea51d003..266bc4d145 100644 --- a/hw/block/fdc-sysbus.c +++ b/hw/block/fdc-sysbus.c @@ -168,7 +168,7 @@ static const VMStateDescription vmstate_sysbus_fdc =3D { .name =3D "fdc", .version_id =3D 2, .minimum_version_id =3D 2, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_STRUCT(state, FDCtrlSysBus, 0, vmstate_fdc, FDCtrl), VMSTATE_END_OF_LIST() } diff --git a/hw/block/fdc.c b/hw/block/fdc.c index d7cc4d3ec1..6dd94e98bc 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -854,7 +854,7 @@ static const VMStateDescription vmstate_fdrive_media_ch= anged =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D fdrive_media_changed_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(media_changed, FDrive), VMSTATE_END_OF_LIST() } @@ -864,7 +864,7 @@ static const VMStateDescription vmstate_fdrive_media_ra= te =3D { .name =3D "fdrive/media_rate", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(media_rate, FDrive), VMSTATE_END_OF_LIST() } @@ -882,7 +882,7 @@ static const VMStateDescription vmstate_fdrive_perpendi= cular =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D fdrive_perpendicular_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(perpendicular, FDrive), VMSTATE_END_OF_LIST() } @@ -899,13 +899,13 @@ static const VMStateDescription vmstate_fdrive =3D { .version_id =3D 1, .minimum_version_id =3D 1, .post_load =3D fdrive_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(head, FDrive), VMSTATE_UINT8(track, FDrive), VMSTATE_UINT8(sect, FDrive), VMSTATE_END_OF_LIST() }, - .subsections =3D (const VMStateDescription*[]) { + .subsections =3D (const VMStateDescription * const []) { &vmstate_fdrive_media_changed, &vmstate_fdrive_media_rate, &vmstate_fdrive_perpendicular, @@ -977,7 +977,7 @@ static const VMStateDescription vmstate_fdc_reset_sense= i =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D fdc_reset_sensei_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_INT32(reset_sensei, FDCtrl), VMSTATE_END_OF_LIST() } @@ -995,7 +995,7 @@ static const VMStateDescription vmstate_fdc_result_time= r =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D fdc_result_timer_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_TIMER_PTR(result_timer, FDCtrl), VMSTATE_END_OF_LIST() } @@ -1013,7 +1013,7 @@ static const VMStateDescription vmstate_fdc_phase =3D= { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D fdc_phase_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(phase, FDCtrl), VMSTATE_END_OF_LIST() } @@ -1026,7 +1026,7 @@ const VMStateDescription vmstate_fdc =3D { .pre_save =3D fdc_pre_save, .pre_load =3D fdc_pre_load, .post_load =3D fdc_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { /* Controller State */ VMSTATE_UINT8(sra, FDCtrl), VMSTATE_UINT8(srb, FDCtrl), @@ -1057,7 +1057,7 @@ const VMStateDescription vmstate_fdc =3D { vmstate_fdrive, FDrive), VMSTATE_END_OF_LIST() }, - .subsections =3D (const VMStateDescription*[]) { + .subsections =3D (const VMStateDescription * const []) { &vmstate_fdc_reset_sensei, &vmstate_fdc_result_timer, &vmstate_fdc_phase, diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index afc3fdf4d6..26ce895628 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -1684,7 +1684,7 @@ static const VMStateDescription vmstate_m25p80_data_r= ead_loop =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D m25p80_data_read_loop_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_BOOL(data_read_loop, Flash), VMSTATE_END_OF_LIST() } @@ -1702,7 +1702,7 @@ static const VMStateDescription vmstate_m25p80_aai_en= able =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D m25p80_aai_enable_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_BOOL(aai_enable, Flash), VMSTATE_END_OF_LIST() } @@ -1720,7 +1720,7 @@ static const VMStateDescription vmstate_m25p80_write_= protect =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D m25p80_wp_level_srwd_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_BOOL(wp_level, Flash), VMSTATE_BOOL(status_register_write_disabled, Flash), VMSTATE_END_OF_LIST() @@ -1743,7 +1743,7 @@ static const VMStateDescription vmstate_m25p80_block_= protect =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D m25p80_block_protect_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_BOOL(block_protect0, Flash), VMSTATE_BOOL(block_protect1, Flash), VMSTATE_BOOL(block_protect2, Flash), @@ -1759,7 +1759,7 @@ static const VMStateDescription vmstate_m25p80 =3D { .minimum_version_id =3D 0, .pre_save =3D m25p80_pre_save, .pre_load =3D m25p80_pre_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(state, Flash), VMSTATE_UINT8_ARRAY(data, Flash, M25P80_INTERNAL_DATA_BUFFER_SZ), VMSTATE_UINT32(len, Flash), @@ -1781,7 +1781,7 @@ static const VMStateDescription vmstate_m25p80 =3D { VMSTATE_UINT8(spansion_cr4nv, Flash), VMSTATE_END_OF_LIST() }, - .subsections =3D (const VMStateDescription * []) { + .subsections =3D (const VMStateDescription * const []) { &vmstate_m25p80_data_read_loop, &vmstate_m25p80_aai_enable, &vmstate_m25p80_write_protect, diff --git a/hw/block/nand.c b/hw/block/nand.c index 9c1b89cfa6..d1435f2207 100644 --- a/hw/block/nand.c +++ b/hw/block/nand.c @@ -345,7 +345,7 @@ static const VMStateDescription vmstate_nand =3D { .minimum_version_id =3D 1, .pre_save =3D nand_pre_save, .post_load =3D nand_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(cle, NANDFlashState), VMSTATE_UINT8(ale, NANDFlashState), VMSTATE_UINT8(ce, NANDFlashState), diff --git a/hw/block/onenand.c b/hw/block/onenand.c index 50d3d1c985..d8a6944027 100644 --- a/hw/block/onenand.c +++ b/hw/block/onenand.c @@ -179,7 +179,7 @@ static const VMStateDescription vmstate_onenand =3D { .minimum_version_id =3D 1, .pre_save =3D onenand_pre_save, .post_load =3D onenand_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(current_direction, OneNANDState), VMSTATE_INT32(cycle, OneNANDState), VMSTATE_INT32(otpmode, OneNANDState), diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 62056b1d74..3e2dc08bd7 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -95,7 +95,7 @@ static const VMStateDescription vmstate_pflash =3D { .version_id =3D 1, .minimum_version_id =3D 1, .post_load =3D pflash_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(wcycle, PFlashCFI01), VMSTATE_UINT8(cmd, PFlashCFI01), VMSTATE_UINT8(status, PFlashCFI01), diff --git a/hw/block/swim.c b/hw/block/swim.c index fd65c59f8a..44761c11cb 100644 --- a/hw/block/swim.c +++ b/hw/block/swim.c @@ -516,7 +516,7 @@ static const VMStateDescription vmstate_fdrive =3D { .name =3D "fdrive", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_END_OF_LIST() }, }; @@ -525,7 +525,7 @@ static const VMStateDescription vmstate_swim =3D { .name =3D "swim", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_INT32(mode, SWIMCtrl), /* IWM mode */ VMSTATE_INT32(iwm_switch, SWIMCtrl), @@ -545,7 +545,7 @@ static const VMStateDescription vmstate_swim =3D { static const VMStateDescription vmstate_sysbus_swim =3D { .name =3D "SWIM", .version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_STRUCT(ctrl, Swim, 0, vmstate_swim, SWIMCtrl), VMSTATE_END_OF_LIST() } diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 818b833108..9aca975245 100644 --- a/hw/block/vhost-user-blk.c +++ b/hw/block/vhost-user-blk.c @@ -556,7 +556,7 @@ static const VMStateDescription vmstate_vhost_user_blk = =3D { .name =3D "vhost-user-blk", .minimum_version_id =3D 1, .version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_VIRTIO_DEVICE, VMSTATE_END_OF_LIST() }, diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index a1f8e15522..a73a834d71 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -1698,7 +1698,7 @@ static const VMStateDescription vmstate_virtio_blk = =3D { .name =3D "virtio-blk", .minimum_version_id =3D 2, .version_id =3D 2, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_VIRTIO_DEVICE, VMSTATE_END_OF_LIST() }, --=20 2.34.1