From patchwork Thu Dec 21 03:16:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 756966 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp687709wrw; Wed, 20 Dec 2023 19:25:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IG0U3DC/mEV5P9HhoCa36+ptWDVXnguRPYNoYmA+NbhsiZD2/gzUbSvn0Re5f1mkVTTfamX X-Received: by 2002:a05:622a:251:b0:425:4043:18ac with SMTP id c17-20020a05622a025100b00425404318acmr28564401qtx.95.1703129138308; Wed, 20 Dec 2023 19:25:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703129138; cv=none; d=google.com; s=arc-20160816; b=HRMiRDxyq42eylBRVl1pqhkdk9FmEBq1INqORe3od92LxOWYeIVyOn4a+ZJZnpxyo9 G2D/psipEgARGp/KNIidaU7R4x5UNP+tSMeUSDnaPgaTNrvztntsxp9eK5XdJozkQxvU ew/JKw8gL6bVrKbnC9hXIPH+cuj61GWIG5ttL6bubayHut4zMa8z5pHGWzWTSdd2Lkx6 tBrORADq7OuDoNKg3mawNS3OFwTxSNMQW9UUv9alyr80pI0wI1d3V688iSEqud+1lw4I jvC1oSRy+mj50bF6ziXN82STChj7UD4w/F5lKvw0ED9zEoFAzv9X8kRyh9h29g7hbS4u klfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=6qb5wT872vgkkQeZLcaPPTqHv9wq2aCmdY3hodAPUnI=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=XXmIab3vA4rvHLf/BYFOkGvPwnf2IiEDEETi/d/GN3UxkfjppzTO1SY+U8RtdrJSaY DswECboIeAQV7DQIdi0MxhtV4okY0N9p/hg8QdQGGKq5UM6rWdp6hDc71ejxlVfvSIf0 IbHyZ+hGwD6iLQIsfwtmxiclsXcR7RFumj8C6otANN4fC6WMEWDZqaJb2pVWO7pfPAiq hu5PGR5Zy1EoFA5PW8zR0NcS+X3ozSVXpLb7yyIqsHESmBToRads41+gCbtXZtTM6HDF y7iDEO4Ub93FfW7czI3KB88vPa6xMjhIEMMyssx/aJWlj1zhNAjwrYTFTpX4JqBtkNOv UtHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="P+dgwG/D"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m18-20020a05622a055200b004239a83db71si1158258qtx.634.2023.12.20.19.25.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Dec 2023 19:25:38 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="P+dgwG/D"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rG9fm-0002El-EI; Wed, 20 Dec 2023 22:24:34 -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 1rG9fa-00020n-BH for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:24:24 -0500 Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rG9fX-0000z7-S3 for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:24:21 -0500 Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-67ab16c38caso1844146d6.1 for ; Wed, 20 Dec 2023 19:24:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703129059; x=1703733859; 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=6qb5wT872vgkkQeZLcaPPTqHv9wq2aCmdY3hodAPUnI=; b=P+dgwG/DvJsrR3pHoTvzn5G4BG8zQeI/i0hU/PdWpO+8DtsAdWCDbRJZTCSF6V5WzN bdvp1H1r18xl71MAfHKt/dnZryPxTiHocYfWRKnySPg+SSHspe4VlsAW4nokfjZmsfHS R2DEJBnCpiENkOk9zEcmyq/d5K3od7S0Z+7P7IR8y0yeozHOq3vbF3dGJWMJ1SXVbcXB Ox++QcAjtkGBK+xEkRSo22t20OTYlRgLChkWtFovJojnrCZl5z/FglTBMn60eZi6zuS8 /+E3A1juDodhxoAL7/07mRcCSq3J7AhNm+8+WjSrLO1VLyYVYGc1TuQ7RRK9mM3hTMt8 smrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703129059; x=1703733859; 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=6qb5wT872vgkkQeZLcaPPTqHv9wq2aCmdY3hodAPUnI=; b=b+FXgi39dUOOOcjBdZnLKQ3nRoCU1wipaCY5sLL8f2fj6ZZn2406I0Desx0+JFceVC Yw5sujszai6AaI5COIGGMafQYGeowxirrJKMf+hhPDfTmVh+3xaia1NqVuRsj7Ey57Mw FLoWquTGApAa0o4VxTQ1GkR4XUPtJvftszJ2fojoFlLuBxx0aSJZAAB6e4fzJHh1N2Lo 6fI9stfat62ulmyOX2vtf63zTJPrvVrw0aV3GQKA0JKBjSvamhOWEWo3l9v5NVvZXTft D4YYP+oCIuAty4lC3tjy9XDY8qgCDNPUF55p1HvPs5SYB0ZqvNSCsQPdc9l2LZ2G+azz t68A== X-Gm-Message-State: AOJu0YzH8ErFJXz1lg9ZrDcarKQp4os5d4n8ETqbskkmstYHTXND7gYt 7e3oUPFJeCkknWVt3vCy3qYkfDEiAk0AZG9YabeQrOh2 X-Received: by 2002:ad4:5d45:0:b0:67f:27be:51ec with SMTP id jk5-20020ad45d45000000b0067f27be51ecmr16250830qvb.100.1703129059008; Wed, 20 Dec 2023 19:24:19 -0800 (PST) Received: from stoup.. ([172.58.139.164]) by smtp.gmail.com with ESMTPSA id l16-20020ad44d10000000b0067f7b6318b9sm347257qvl.10.2023.12.20.19.24.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 19:24:18 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 62/71] hw/misc/macio: Constify VMState Date: Thu, 21 Dec 2023 14:16:43 +1100 Message-Id: <20231221031652.119827-63-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 Received-SPF: pass client-ip=2607:f8b0:4864:20::f29; envelope-from=richard.henderson@linaro.org; helo=mail-qv1-xf29.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Richard Henderson --- hw/misc/macio/cuda.c | 2 +- hw/misc/macio/gpio.c | 2 +- hw/misc/macio/mac_dbdma.c | 8 ++++---- hw/misc/macio/macio.c | 4 ++-- hw/misc/macio/pmu.c | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index 6336dcb194..41934e2cf8 100644 --- a/hw/misc/macio/cuda.c +++ b/hw/misc/macio/cuda.c @@ -487,7 +487,7 @@ static const VMStateDescription vmstate_cuda = { .name = "cuda", .version_id = 6, .minimum_version_id = 6, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_STRUCT(mos6522_cuda.parent_obj, CUDAState, 0, vmstate_mos6522, MOS6522State), VMSTATE_UINT8(last_b, CUDAState), diff --git a/hw/misc/macio/gpio.c b/hw/misc/macio/gpio.c index 4deb330471..549563747d 100644 --- a/hw/misc/macio/gpio.c +++ b/hw/misc/macio/gpio.c @@ -168,7 +168,7 @@ static const VMStateDescription vmstate_macio_gpio = { .name = "macio_gpio", .version_id = 0, .minimum_version_id = 0, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT8_ARRAY(gpio_levels, MacIOGPIOState, 8), VMSTATE_UINT8_ARRAY(gpio_regs, MacIOGPIOState, 36), VMSTATE_END_OF_LIST() diff --git a/hw/misc/macio/mac_dbdma.c b/hw/misc/macio/mac_dbdma.c index 80a789f32b..2a528ea08c 100644 --- a/hw/misc/macio/mac_dbdma.c +++ b/hw/misc/macio/mac_dbdma.c @@ -807,7 +807,7 @@ static const VMStateDescription vmstate_dbdma_io = { .name = "dbdma_io", .version_id = 0, .minimum_version_id = 0, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT64(addr, struct DBDMA_io), VMSTATE_INT32(len, struct DBDMA_io), VMSTATE_INT32(is_last, struct DBDMA_io), @@ -821,7 +821,7 @@ static const VMStateDescription vmstate_dbdma_cmd = { .name = "dbdma_cmd", .version_id = 0, .minimum_version_id = 0, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT16(req_count, dbdma_cmd), VMSTATE_UINT16(command, dbdma_cmd), VMSTATE_UINT32(phy_addr, dbdma_cmd), @@ -836,7 +836,7 @@ static const VMStateDescription vmstate_dbdma_channel = { .name = "dbdma_channel", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32_ARRAY(regs, struct DBDMA_channel, DBDMA_REGS), VMSTATE_STRUCT(io, struct DBDMA_channel, 0, vmstate_dbdma_io, DBDMA_io), VMSTATE_STRUCT(current, struct DBDMA_channel, 0, vmstate_dbdma_cmd, @@ -849,7 +849,7 @@ static const VMStateDescription vmstate_dbdma = { .name = "dbdma", .version_id = 3, .minimum_version_id = 3, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_STRUCT_ARRAY(channels, DBDMAState, DBDMA_CHANNELS, 1, vmstate_dbdma_channel, DBDMA_channel), VMSTATE_END_OF_LIST() diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c index 265c0bbd8d..c9f22f8515 100644 --- a/hw/misc/macio/macio.c +++ b/hw/misc/macio/macio.c @@ -376,7 +376,7 @@ static const VMStateDescription vmstate_macio_oldworld = { .name = "macio-oldworld", .version_id = 0, .minimum_version_id = 0, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj.parent, OldWorldMacIOState), VMSTATE_END_OF_LIST() } @@ -396,7 +396,7 @@ static const VMStateDescription vmstate_macio_newworld = { .name = "macio-newworld", .version_id = 0, .minimum_version_id = 0, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj.parent, NewWorldMacIOState), VMSTATE_END_OF_LIST() } diff --git a/hw/misc/macio/pmu.c b/hw/misc/macio/pmu.c index 58316d1871..e9a90da88f 100644 --- a/hw/misc/macio/pmu.c +++ b/hw/misc/macio/pmu.c @@ -668,7 +668,7 @@ static const VMStateDescription vmstate_pmu_adb = { .version_id = 1, .minimum_version_id = 1, .needed = pmu_adb_state_needed, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT8(adb_reply_size, PMUState), VMSTATE_BUFFER(adb_reply, PMUState), VMSTATE_END_OF_LIST() @@ -679,7 +679,7 @@ static const VMStateDescription vmstate_pmu = { .name = "pmu", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_STRUCT(mos6522_pmu.parent_obj, PMUState, 0, vmstate_mos6522, MOS6522State), VMSTATE_UINT8(last_b, PMUState), @@ -698,7 +698,7 @@ static const VMStateDescription vmstate_pmu = { VMSTATE_INT64(one_sec_target, PMUState), VMSTATE_END_OF_LIST() }, - .subsections = (const VMStateDescription * []) { + .subsections = (const VMStateDescription * const []) { &vmstate_pmu_adb, NULL }