From nobody Wed Nov 27 00:45:05 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=1703129133; cv=none; d=zohomail.com; s=zohoarc; b=LN4azpgYLBVj4hySOw377LoG7DX95dIRI327ZLVH+2CEJ/xWz68auFzK+cBth4gBHBsx+b/1xp2Awa50snLVFxz2ChH5qhECKFXOYBBT3PTIcJgB6KggtVXnt9wJ+F4PeEP+fKlM9Fg2ZffJlcFgmplULOr61ylRelHlf8C8upw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703129133; 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=E2Zk4l5QNKn4te4fcYT5jUoKGYUCkVWAdFMiTl7xTnU=; b=I/e7xN97nmpDITKbzLjPz+VtlOT0ql+TQqNTT3LARUgpqYuPVwkMUf1plc1L8yLbc67Qy8nql3hng/x/4ddAls11tTg+Hq4yrmZ7gvR7AG3WndMXqvAaKwlsxjCtnZ8Zc/0eLPm+mNHczP4Ut+yTRtOR8E5tD4+zIGuLb8T6SP0= 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 1703129133320346.8763353781734; Wed, 20 Dec 2023 19:25:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rG9et-0008D4-I3; Wed, 20 Dec 2023 22:23:39 -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 1rG9er-0008AG-OE for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:23:38 -0500 Received: from mail-qv1-xf2d.google.com ([2607:f8b0:4864:20::f2d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rG9ep-00070W-Nr for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:23:37 -0500 Received: by mail-qv1-xf2d.google.com with SMTP id 6a1803df08f44-67ad5b37147so1787556d6.2 for ; Wed, 20 Dec 2023 19:23:34 -0800 (PST) Received: from stoup.. ([172.58.139.164]) by smtp.gmail.com with ESMTPSA id l16-20020ad44d10000000b0067f7b6318b9sm347257qvl.10.2023.12.20.19.23.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 19:23:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703129014; x=1703733814; 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=E2Zk4l5QNKn4te4fcYT5jUoKGYUCkVWAdFMiTl7xTnU=; b=qRGxR9mjCXY3mxb7pNJt0eIshozgz6xQnvsRurMcZoGVIepL8Wnwe/oHxz2rpCO10B XP1K0Y1Bwj8beWn2CVN4lVnT1A9blUQ5cWJVPPrdjeXX9PnKXX3rpg+o7fvmiurwdvx6 dPgr8cOXEcafcHBH2aHp7Ubq++aN75m7tUiLw5v54s0yX0kF0NLnY4j0o2R7m26Ubrol d2ZEHp3y8eesKyKHbYSRX7OK991gpXfE4nyF4zf5iic7+a7eeOuQnuaRZHyfCmwbErqb vghpxBw0ljIIFbCkzpsnTfP/amxtS1b2LZAHzx3mVWpw61p4rD9n+7NVoQ81lxhyNu8+ u07A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703129014; x=1703733814; 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=E2Zk4l5QNKn4te4fcYT5jUoKGYUCkVWAdFMiTl7xTnU=; b=BwagX5vy7HOIYdgrlFxXa17WL90XMpFSmeD/L+s924c+kqFLywBegPwH3xE/f7MR7U KvaqLPawQ31kG4jVCPIgNlwIi06l/fpxXGFY28lqXrbilai63SoM8Us+QlPuwe8CEl83 5DdpG4o5UDWAuIy65rzv8ek5bGTkifogwbnanPOXkuBzT3kGtJc0+sMlhN5Or7sT1B+D 8YtAEkqa4lao/dpbK+bD4tq7Vl0oWbtQSds0l7YI/3xVIOmd0KFbJx6c2n20oJN4pyqN IGiEu5yp/mDXYZ2PDvIOaU4UTwIUwQ9EUohHch2oI6Um2IwIZReeFzeXa2Aa7MvMmxPc qZCg== X-Gm-Message-State: AOJu0YzxOtqxzoqJz1b5Iym7D0PRnJZ6c1cCit/0Dy0LmTWlrIVUdLm4 1ASZzUesMedvL8L+2ROTCu4Isj42nYZaU4urhjsqF25s X-Google-Smtp-Source: AGHT+IF9eI565j9n5Hry7wabJIplhigvtFTNUGuP5VNmtYL0k139zkdgvkEmYz8Ua81375zQ2vcGVA== X-Received: by 2002:a05:6214:2509:b0:67f:2b5:b96a with SMTP id gf9-20020a056214250900b0067f02b5b96amr20628541qvb.51.1703129014289; Wed, 20 Dec 2023 19:23:34 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 51/71] hw/scsi: Constify VMState Date: Thu, 21 Dec 2023 14:16:32 +1100 Message-Id: <20231221031652.119827-52-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::f2d; envelope-from=richard.henderson@linaro.org; helo=mail-qv1-xf2d.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: 1703129134544100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- 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 fc4b77fdb0..d27a4b354a 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@ -1826,7 +1826,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), @@ -1838,7 +1838,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), @@ -1856,7 +1856,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 6691f5edb8..45099fc5e6 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -3168,7 +3168,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 3126df9e1d..97a1f75ef1 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 780f10559d..bab7594899 100644 --- a/hw/scsi/vhost-user-scsi.c +++ b/hw/scsi/vhost-user-scsi.c @@ -378,7 +378,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 9c751bf296..3076cd7b1b 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -1303,7 +1303,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