From nobody Wed Nov 27 00:34:03 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=1703128903; cv=none; d=zohomail.com; s=zohoarc; b=W4uR/HxMoLg1ZhAWmmbjCUZYARXCvgui8OIp1jBvAa4ldn/nSfNL7PQmq0UGrdb1W3hmUy7ObzjgsHM4B0YqZ1AOv3zT/RABphIt4+TXGx9x7tIIeEpkpCE5NhuV1y7Pf5eIKayPqx+CG60W63Dy3rGMFrQbskGLjeOKZcxjG+s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703128903; 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=TwTu2uwZKwQsQgRXhNqghxLsmgTtqvnKVK7hajFstQ8=; b=J7EAFOpxt8+xeqRAvCA4/kVmYpA+u9ur1ZewdP3fM1+ZEQGzTbG+v3uSNBFOD23qpVI9cG55AFADD4R2g4hVtAlY28r8u4zQKNygqDNiz1d2knMQOk3RppIpHy0FFnFbgzUQGsJYEPlO91Br2s9Fd+Q3JQ6yvLUelLFaNwQkyKI= 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 1703128903644501.55890270300154; Wed, 20 Dec 2023 19:21:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rG9ag-0004lD-3n; Wed, 20 Dec 2023 22:19:18 -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 1rG9ac-0004bc-3Y for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:19:14 -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 1rG9aZ-00044E-T3 for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:19:13 -0500 Received: by mail-qk1-x731.google.com with SMTP id af79cd13be357-78106c385a1so20254485a.0 for ; Wed, 20 Dec 2023 19:19:11 -0800 (PST) Received: from stoup.. ([172.58.139.164]) by smtp.gmail.com with ESMTPSA id n8-20020a05620a294800b0078116d55191sm360808qkp.130.2023.12.20.19.19.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 19:19:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703128751; x=1703733551; 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=TwTu2uwZKwQsQgRXhNqghxLsmgTtqvnKVK7hajFstQ8=; b=DmGtFkiM/PO43XMiRyCKd6SF2kULlpAo8zvqIMLvFm+GvRUGNRtBiYML8tlbB5PkRj /t4qCpKaUgjbTFWHKTl2hEE/g39DgI3vRsl+ltc4PXxL8MRoNlIYRp2PhylaMQDHyA6S 77l6kOXdHcbhlB+KMXPUEm/b9Lh1lZ61bRQt45vYyGmVu/ZCzCKwNn0jkja/I3yRIAoC CHTJkyfkKqM5yqentbn+1SKWQavezn6wbbMv9g+BAjWR+BbW2ag4T2Dwzqgd3mn7aWBQ JXDe+pNXclWGM549frK9Pm6yIzjWshShzxG3ahsaXPuV3DNvHxnTEyqm/mqn7QbbyerY m82Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703128751; x=1703733551; 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=TwTu2uwZKwQsQgRXhNqghxLsmgTtqvnKVK7hajFstQ8=; b=Vhly/rzVMMhyRTYKt1dOvjF5f1Wo0iKMZy8gyVVLZztQQ8BhvrfjNhsJEauryqZJFn tRS1diD1U6t+CvD5AHiDuFTz7SPLk8NCuffb9uev6jvWq5D9PcPlESBbM5VrGH2bT7f+ OE7ZXOrqG2avkewGreqBTSMoq2HHffmISMF5pwPYNoiXRResSVMcXqC3W2fejw+mSc2q 2q6oO/mpr179wk/uW+2kyhizP3eAuj52w87vgo+EHHDOnR+yzbp80BAJ3Unh3HZbMxgF qvvZdf7GL/wC7x4UpD1mkkj0ZrzWFWRwb035IlDtPa2xSZiPRVlC+ba3QERCEZSi1Bnm ffmA== X-Gm-Message-State: AOJu0Yz2IEMDdb9lZwfeqj63XUolluVUSvtox8PfzGaVSCqB8cuFJS9u qST4SfzJuhounJPbUjEl+aCfn97Yh9950EmFfnmkvAdZ X-Google-Smtp-Source: AGHT+IFqKLzqaj1Ytx9vwFdyedo9PUGC4jhX2lTXrOXttjq3+pdt2vPPG2ST6LcGNF50azUsOYtOqg== X-Received: by 2002:a37:ad03:0:b0:77f:64b:4b1d with SMTP id f3-20020a37ad03000000b0077f064b4b1dmr23307442qkm.115.1703128750974; Wed, 20 Dec 2023 19:19:10 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 32/71] hw/ide: Constify VMState Date: Thu, 21 Dec 2023 14:16:13 +1100 Message-Id: <20231221031652.119827-33-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::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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1703128905800100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- hw/ide/ahci-allwinner.c | 2 +- hw/ide/ahci.c | 8 ++++---- hw/ide/core.c | 16 ++++++++-------- hw/ide/ich.c | 2 +- hw/ide/isa.c | 2 +- hw/ide/macio.c | 2 +- hw/ide/microdrive.c | 2 +- hw/ide/mmio.c | 2 +- hw/ide/pci.c | 10 +++++----- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/hw/ide/ahci-allwinner.c b/hw/ide/ahci-allwinner.c index 227e747ba7..b173121006 100644 --- a/hw/ide/ahci-allwinner.c +++ b/hw/ide/ahci-allwinner.c @@ -97,7 +97,7 @@ static const VMStateDescription vmstate_allwinner_ahci = =3D { .name =3D "allwinner-ahci", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32_ARRAY(regs, AllwinnerAHCIState, ALLWINNER_AHCI_MMIO_SIZE / 4), VMSTATE_END_OF_LIST() diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index afdc44b8e0..0eb83a6d46 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1685,7 +1685,7 @@ void ahci_reset(AHCIState *s) static const VMStateDescription vmstate_ncq_tfs =3D { .name =3D "ncq state", .version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(sector_count, NCQTransferState), VMSTATE_UINT64(lba, NCQTransferState), VMSTATE_UINT8(tag, NCQTransferState), @@ -1700,7 +1700,7 @@ static const VMStateDescription vmstate_ncq_tfs =3D { static const VMStateDescription vmstate_ahci_device =3D { .name =3D "ahci port", .version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_IDE_BUS(port, AHCIDevice), VMSTATE_IDE_DRIVE(port.ifs[0], AHCIDevice), VMSTATE_UINT32(port_state, AHCIDevice), @@ -1817,7 +1817,7 @@ const VMStateDescription vmstate_ahci =3D { .name =3D "ahci", .version_id =3D 1, .post_load =3D ahci_state_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_STRUCT_VARRAY_POINTER_INT32(dev, AHCIState, ports, vmstate_ahci_device, AHCIDevice), VMSTATE_UINT32(control_regs.cap, AHCIState), @@ -1833,7 +1833,7 @@ const VMStateDescription vmstate_ahci =3D { =20 static const VMStateDescription vmstate_sysbus_ahci =3D { .name =3D "sysbus-ahci", - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_AHCI(ahci, SysbusAHCIState), VMSTATE_END_OF_LIST() }, diff --git a/hw/ide/core.c b/hw/ide/core.c index 8a0579bff4..9c4a812902 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -2918,7 +2918,7 @@ static const VMStateDescription vmstate_ide_atapi_ges= n_state =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D ide_atapi_gesn_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_BOOL(events.new_media, IDEState), VMSTATE_BOOL(events.eject_request, IDEState), VMSTATE_END_OF_LIST() @@ -2930,7 +2930,7 @@ static const VMStateDescription vmstate_ide_tray_stat= e =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D ide_tray_state_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_BOOL(tray_open, IDEState), VMSTATE_BOOL(tray_locked, IDEState), VMSTATE_END_OF_LIST() @@ -2944,7 +2944,7 @@ static const VMStateDescription vmstate_ide_drive_pio= _state =3D { .pre_save =3D ide_drive_pio_pre_save, .post_load =3D ide_drive_pio_post_load, .needed =3D ide_drive_pio_state_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_INT32(req_nb_sectors, IDEState), VMSTATE_VARRAY_INT32(io_buffer, IDEState, io_buffer_total_len, 1, vmstate_info_uint8, uint8_t), @@ -2962,7 +2962,7 @@ const VMStateDescription vmstate_ide_drive =3D { .version_id =3D 3, .minimum_version_id =3D 0, .post_load =3D ide_drive_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_INT32(mult_sectors, IDEState), VMSTATE_INT32(identify_set, IDEState), VMSTATE_BUFFER_TEST(identify_data, IDEState, is_identify_set), @@ -2985,7 +2985,7 @@ const VMStateDescription vmstate_ide_drive =3D { VMSTATE_UINT8_V(cdrom_changed, IDEState, 3), VMSTATE_END_OF_LIST() }, - .subsections =3D (const VMStateDescription*[]) { + .subsections =3D (const VMStateDescription * const []) { &vmstate_ide_drive_pio_state, &vmstate_ide_tray_state, &vmstate_ide_atapi_gesn_state, @@ -2998,7 +2998,7 @@ static const VMStateDescription vmstate_ide_error_sta= tus =3D { .version_id =3D 2, .minimum_version_id =3D 1, .needed =3D ide_error_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_INT32(error_status, IDEBus), VMSTATE_INT64_V(retry_sector_num, IDEBus, 2), VMSTATE_UINT32_V(retry_nsector, IDEBus, 2), @@ -3011,12 +3011,12 @@ const VMStateDescription vmstate_ide_bus =3D { .name =3D "ide_bus", .version_id =3D 1, .minimum_version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(cmd, IDEBus), VMSTATE_UINT8(unit, IDEBus), VMSTATE_END_OF_LIST() }, - .subsections =3D (const VMStateDescription*[]) { + .subsections =3D (const VMStateDescription * const []) { &vmstate_ide_error_status, NULL } diff --git a/hw/ide/ich.c b/hw/ide/ich.c index d61faab532..49f8eb8a7d 100644 --- a/hw/ide/ich.c +++ b/hw/ide/ich.c @@ -83,7 +83,7 @@ static const VMStateDescription vmstate_ich9_ahci =3D { .name =3D "ich9_ahci", .version_id =3D 1, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, AHCIPCIState), VMSTATE_AHCI(ahci, AHCIPCIState), VMSTATE_END_OF_LIST() diff --git a/hw/ide/isa.c b/hw/ide/isa.c index ea60c08116..cc865c83dc 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -58,7 +58,7 @@ static const VMStateDescription vmstate_ide_isa =3D { .name =3D "isa-ide", .version_id =3D 3, .minimum_version_id =3D 0, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_IDE_BUS(bus, ISAIDEState), VMSTATE_IDE_DRIVES(bus.ifs, ISAIDEState), VMSTATE_END_OF_LIST() diff --git a/hw/ide/macio.c b/hw/ide/macio.c index dca1cc9efc..0d2c6ba910 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -361,7 +361,7 @@ static const VMStateDescription vmstate_pmac =3D { .name =3D "ide", .version_id =3D 5, .minimum_version_id =3D 0, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_IDE_BUS(bus, MACIOIDEState), VMSTATE_IDE_DRIVES(bus.ifs, MACIOIDEState), VMSTATE_BOOL(dma_active, MACIOIDEState), diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c index 981cfbd97f..a7f415f0fc 100644 --- a/hw/ide/microdrive.c +++ b/hw/ide/microdrive.c @@ -336,7 +336,7 @@ static const VMStateDescription vmstate_microdrive =3D { .name =3D "microdrive", .version_id =3D 3, .minimum_version_id =3D 0, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(opt, MicroDriveState), VMSTATE_UINT8(stat, MicroDriveState), VMSTATE_UINT8(pins, MicroDriveState), diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c index 3aeacab3bb..e8f41c0610 100644 --- a/hw/ide/mmio.c +++ b/hw/ide/mmio.c @@ -110,7 +110,7 @@ static const VMStateDescription vmstate_ide_mmio =3D { .name =3D "mmio-ide", .version_id =3D 3, .minimum_version_id =3D 0, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_IDE_BUS(bus, MMIOIDEState), VMSTATE_IDE_DRIVES(bus.ifs, MMIOIDEState), VMSTATE_END_OF_LIST() diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 810c6b6d98..ca85d8474c 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -501,7 +501,7 @@ static const VMStateDescription vmstate_bmdma_current = =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D ide_bmdma_current_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT32(cur_addr, BMDMAState), VMSTATE_UINT32(cur_prd_last, BMDMAState), VMSTATE_UINT32(cur_prd_addr, BMDMAState), @@ -515,7 +515,7 @@ static const VMStateDescription vmstate_bmdma_status = =3D { .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D ide_bmdma_status_needed, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(status, BMDMAState), VMSTATE_END_OF_LIST() } @@ -526,7 +526,7 @@ static const VMStateDescription vmstate_bmdma =3D { .version_id =3D 3, .minimum_version_id =3D 0, .pre_save =3D ide_bmdma_pre_save, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_UINT8(cmd, BMDMAState), VMSTATE_UINT8(migration_compat_status, BMDMAState), VMSTATE_UINT32(addr, BMDMAState), @@ -535,7 +535,7 @@ static const VMStateDescription vmstate_bmdma =3D { VMSTATE_UINT8(migration_retry_unit, BMDMAState), VMSTATE_END_OF_LIST() }, - .subsections =3D (const VMStateDescription*[]) { + .subsections =3D (const VMStateDescription * const []) { &vmstate_bmdma_current, &vmstate_bmdma_status, NULL @@ -562,7 +562,7 @@ const VMStateDescription vmstate_ide_pci =3D { .version_id =3D 3, .minimum_version_id =3D 0, .post_load =3D ide_pci_post_load, - .fields =3D (VMStateField[]) { + .fields =3D (const VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, PCIIDEState), VMSTATE_STRUCT_ARRAY(bmdma, PCIIDEState, 2, 0, vmstate_bmdma, BMDMAState), --=20 2.34.1