From nobody Tue Nov 26 22:27:48 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=1703885383; cv=none; d=zohomail.com; s=zohoarc; b=mApAPLUufaVFhWyzkspvy8MSFVAWUg6qzHZy0EeW0/0y1bKbbEvmQKnh6E3QMdt/76hPnaPQmakEK4mWNt6FMQ4HIhSWTfNG4IU0u3BmpwiQn29SwArGwKnC+Y03EUvGibpbyGFtDjBLlUbt39fY8oEv702FN5IBcSOahQVU3GM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703885382; 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=uWYrugkHEWBc6Cby1jqzi6Op/DM/ZQDlsHv8VnjupHU=; b=GxQsJMMcFL7NheK8Ymh0tUVoS6GECulYUKxl5Iw4vjoGAdKKjfDgeqoAtHJjOdMLuCIs5eCEgsv+/9XmV6VKdOLTZ4/t3aOPtn+KQh+95XV+HBXGwhp1kqw9jUMJm2rlIflJx4B5Qv1RL15ThX/Xp42SQchFdTPwqRUsCyDMClk= 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 1703885382932543.4560257749475; Fri, 29 Dec 2023 13:29:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJKPk-0007IM-Eg; Fri, 29 Dec 2023 16:29:08 -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 1rJKPj-0007HX-6R for qemu-devel@nongnu.org; Fri, 29 Dec 2023 16:29:07 -0500 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rJKPX-0000M4-5t for qemu-devel@nongnu.org; Fri, 29 Dec 2023 16:29:06 -0500 Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-5bdbe2de25fso5599891a12.3 for ; Fri, 29 Dec 2023 13:28:54 -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 bd33-20020a056a0027a100b006d9a96b7d0dsm11285396pfb.208.2023.12.29.13.28.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 13:28:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703885334; x=1704490134; 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=uWYrugkHEWBc6Cby1jqzi6Op/DM/ZQDlsHv8VnjupHU=; b=bfu9xg/siLNpFFfa0qrFl5lGjRTvyRoIHk0C4ELNEtFFNHjML4purtYA5N6G6Dob4T vuF4ZozcxbuIZCbc7xTq+dJZp4+Gyapn1tttOWNCBT8kvabBCk6QfZbcwlmC5E4KHf7k DAWoLml+Up/YD2PyuG8zyw3fJvAaqlrVfxFgfYHOKL9NINwhYUCyE8xTm9xG75ec14ZX UheYSOTFdTNyM8sQAc5bDZgz900I+Na/OwjQhPsrpkAjMVE9Bhh3/2Q5FevyMd1jV26M tg5BFzZx1ia3GHMw8uGyxdOrO/J0fINC+H+V00eG783liXeRVNMxSpc6gUsokPhl/Tpw KDUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703885334; x=1704490134; 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=uWYrugkHEWBc6Cby1jqzi6Op/DM/ZQDlsHv8VnjupHU=; b=EOjKnYpxXfu+Gfk6iNqEXYezeMuQtH0cDv3q2fF2O3cy48Y3GrNsau9lKvGveQ70JJ qSLmwjHU1YMsRrHXg2bjqMycEzZzlP9vyWFFeZYkhuDTCuEbrv+MWsv4RiS2pfPhZnBj AanChblKtX65yWkvvuj3VddNLO96fDK1jddrwzjeVi/TqZ17REKAl7aHuUBvmaGIM1TJ KTWsOWMv+shUMZsg2skPx8wPlU8jSRLfwNGUfRjV732T40vuZxd3XjfGfa47+EQ3RU/7 6oUXZoqELmr2t/YT2jSAbo04gswLqGIOV8+/L0iN/7ZusZUU7C1JKBkMpRa4UjLPKI3B z1Cg== X-Gm-Message-State: AOJu0Yzj65hZCwmZxW7Rity1Uebu6f05odC8yrQNxUfk+Zu6/n0pwkTO v0Nvbp2jpxrhxIzYl2pB3pB0qcNtV5fdjzJYy86nWdtQpkU1GQ== X-Google-Smtp-Source: AGHT+IEvGcfaZcxXJFr9wwYuRsuGlVFzQ5wkHy4eQLhV29XsUDl3rSuodRq8ciQAipDWEkbLnYm3Aw== X-Received: by 2002:a05:6a20:471b:b0:18f:97c:8a43 with SMTP id ek27-20020a056a20471b00b0018f097c8a43mr14316517pzb.110.1703885333881; Fri, 29 Dec 2023 13:28:53 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 51/71] hw/scsi: Constify VMState Date: Sat, 30 Dec 2023 08:23:26 +1100 Message-Id: <20231229212346.147149-52-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 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::531; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x531.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: 1703885384536100007 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Message-Id: <20231221031652.119827-52-richard.henderson@linaro.org> --- hw/scsi/esp-pci.c | 2 +- hw/scsi/esp.c | 8 ++++---- hw/scsi/lsi53c895a.c | 2 +- hw/scsi/megasas.c | 4 ++-- hw/scsi/mptsas.c | 2 +- hw/scsi/scsi-bus.c | 6 +++--- hw/scsi/scsi-disk.c | 2 +- hw/scsi/spapr_vscsi.c | 4 ++-- hw/scsi/vhost-scsi.c | 2 +- hw/scsi/vhost-user-scsi.c | 2 +- hw/scsi/virtio-scsi.c | 2 +- hw/scsi/vmw_pvscsi.c | 6 +++--- 12 files changed, 21 insertions(+), 21 deletions(-) diff --git a/hw/scsi/esp-pci.c b/hw/scsi/esp-pci.c index 4e890db0e2..93b3429e0f 100644 --- a/hw/scsi/esp-pci.c +++ b/hw/scsi/esp-pci.c @@ -333,7 +333,7 @@ static const VMStateDescription vmstate_esp_pci_scsi = =3D { .version_id =3D 2, .minimum_version_id =3D 1, .pre_save =3D esp_pre_save, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, PCIESPState), VMSTATE_BUFFER_UNSAFE(dma_regs, PCIESPState, 0, 8 * sizeof(uint32_= t)), VMSTATE_UINT8_V(esp.mig_version_id, PCIESPState, 2), diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index 9b11d8c573..ff90572830 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -1237,7 +1237,7 @@ static const VMStateDescription vmstate_esp_pdma =3D { .version_id =3D 0, .minimum_version_id =3D 0, .needed =3D esp_pdma_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(pdma_cb, ESPState), VMSTATE_END_OF_LIST() } @@ -1248,7 +1248,7 @@ const VMStateDescription vmstate_esp =3D { .version_id =3D 6, .minimum_version_id =3D 3, .post_load =3D esp_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_BUFFER(rregs, ESPState), VMSTATE_BUFFER(wregs, ESPState), VMSTATE_INT32(ti_size, ESPState), @@ -1277,7 +1277,7 @@ const VMStateDescription vmstate_esp =3D { VMSTATE_UINT8_TEST(lun, ESPState, esp_is_version_6), VMSTATE_END_OF_LIST() }, - .subsections =3D (const VMStateDescription * []) { + .subsections =3D (const VMStateDescription * const []) { &vmstate_esp_pdma, NULL } @@ -1448,7 +1448,7 @@ static const VMStateDescription vmstate_sysbus_esp_sc= si =3D { .version_id =3D 2, .minimum_version_id =3D 1, .pre_save =3D esp_pre_save, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8_V(esp.mig_version_id, SysBusESPState, 2), VMSTATE_STRUCT(esp, SysBusESPState, 0, vmstate_esp, ESPState), VMSTATE_END_OF_LIST() diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c index 634ed49c2e..34e3b89287 100644 --- a/hw/scsi/lsi53c895a.c +++ b/hw/scsi/lsi53c895a.c @@ -2205,7 +2205,7 @@ static const VMStateDescription vmstate_lsi_scsi =3D { .minimum_version_id =3D 0, .pre_save =3D lsi_pre_save, .post_load =3D lsi_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, LSIState), =20 VMSTATE_INT32(carry, LSIState), diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index 32c70c9e99..2d0c607177 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c @@ -2299,7 +2299,7 @@ static const VMStateDescription vmstate_megasas_gen1 = =3D { .name =3D "megasas", .version_id =3D 0, .minimum_version_id =3D 0, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, MegasasState), VMSTATE_MSIX(parent_obj, MegasasState), =20 @@ -2317,7 +2317,7 @@ static const VMStateDescription vmstate_megasas_gen2 = =3D { .name =3D "megasas-gen2", .version_id =3D 0, .minimum_version_id =3D 0, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, MegasasState), VMSTATE_MSIX(parent_obj, MegasasState), =20 diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c index 75d3ab8bd1..c5d3138c93 100644 --- a/hw/scsi/mptsas.c +++ b/hw/scsi/mptsas.c @@ -1366,7 +1366,7 @@ static const VMStateDescription vmstate_mptsas =3D { .version_id =3D 0, .minimum_version_id =3D 0, .post_load =3D mptsas_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_PCI_DEVICE(dev, MPTSASState), VMSTATE_BOOL(msi_in_use, MPTSASState), VMSTATE_UINT32(state, MPTSASState), diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index 5b08cbf60a..0a2eb11c56 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@ -1893,7 +1893,7 @@ static const VMStateDescription vmstate_scsi_sense_st= ate =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D scsi_sense_state_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8_SUB_ARRAY(sense, SCSIDevice, SCSI_SENSE_BUF_SIZE_OLD, SCSI_SENSE_BUF_SIZE - SCSI_SENSE_BUF_SIZE_= OLD), @@ -1905,7 +1905,7 @@ const VMStateDescription vmstate_scsi_device =3D { .name =3D "SCSIDevice", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(unit_attention.key, SCSIDevice), VMSTATE_UINT8(unit_attention.asc, SCSIDevice), VMSTATE_UINT8(unit_attention.ascq, SCSIDevice), @@ -1923,7 +1923,7 @@ const VMStateDescription vmstate_scsi_device =3D { }, VMSTATE_END_OF_LIST() }, - .subsections =3D (const VMStateDescription*[]) { + .subsections =3D (const VMStateDescription * const []) { &vmstate_scsi_sense_state, NULL } diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 2e7e1e9a1c..4bd7af9d0c 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -3137,7 +3137,7 @@ static const VMStateDescription vmstate_scsi_disk_sta= te =3D { .name =3D "scsi-disk", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_SCSI_DEVICE(qdev, SCSIDiskState), VMSTATE_BOOL(media_changed, SCSIDiskState), VMSTATE_BOOL(media_event, SCSIDiskState), diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c index 5bbbef64ef..c75a6c8807 100644 --- a/hw/scsi/spapr_vscsi.c +++ b/hw/scsi/spapr_vscsi.c @@ -605,7 +605,7 @@ static const VMStateDescription vmstate_spapr_vscsi_req= =3D { .name =3D "spapr_vscsi_req", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_BUFFER(crq.raw, vscsi_req), VMSTATE_BUFFER(viosrp_iu_buf, vscsi_req), VMSTATE_UINT32(qtag, vscsi_req), @@ -1259,7 +1259,7 @@ static const VMStateDescription vmstate_spapr_vscsi = =3D { .name =3D "spapr_vscsi", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_SPAPR_VIO(vdev, VSCSIState), /* VSCSI state */ /* ???? */ diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c index 6159eb6fec..58a00336c2 100644 --- a/hw/scsi/vhost-scsi.c +++ b/hw/scsi/vhost-scsi.c @@ -158,7 +158,7 @@ static const VMStateDescription vmstate_virtio_vhost_sc= si =3D { .name =3D "virtio-vhost_scsi", .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/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c index af18c4f3d3..a63b1f4948 100644 --- a/hw/scsi/vhost-user-scsi.c +++ b/hw/scsi/vhost-user-scsi.c @@ -379,7 +379,7 @@ static const VMStateDescription vmstate_vhost_scsi =3D { .name =3D "virtio-scsi", .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/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index ca365a70e9..690aceec45 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -1305,7 +1305,7 @@ static const VMStateDescription vmstate_virtio_scsi = =3D { .name =3D "virtio-scsi", .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/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c index 4de34536e9..cd7bf6aa01 100644 --- a/hw/scsi/vmw_pvscsi.c +++ b/hw/scsi/vmw_pvscsi.c @@ -1249,7 +1249,7 @@ static bool pvscsi_vmstate_test_pci_device(void *opaq= ue, int version_id) static const VMStateDescription vmstate_pvscsi_pcie_device =3D { .name =3D "pvscsi/pcie", .needed =3D pvscsi_vmstate_need_pcie_device, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, PVSCSIState), VMSTATE_END_OF_LIST() } @@ -1261,7 +1261,7 @@ static const VMStateDescription vmstate_pvscsi =3D { .minimum_version_id =3D 0, .pre_save =3D pvscsi_pre_save, .post_load =3D pvscsi_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_STRUCT_TEST(parent_obj, PVSCSIState, pvscsi_vmstate_test_pci_device, 0, vmstate_pci_device, PCIDevice), @@ -1290,7 +1290,7 @@ static const VMStateDescription vmstate_pvscsi =3D { =20 VMSTATE_END_OF_LIST() }, - .subsections =3D (const VMStateDescription*[]) { + .subsections =3D (const VMStateDescription * const []) { &vmstate_pvscsi_pcie_device, NULL } --=20 2.34.1