From patchwork Mon Nov 6 06:58:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 741299 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp949840wrr; Sun, 5 Nov 2023 23:13:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IF/QIT5Z0Q+9nmXFKjHqIeXaAjKH/p6NoqRrbOKha92EGWYSp/ZAsp0GTIE3pTj676jR2AC X-Received: by 2002:a05:6214:21ef:b0:675:5925:7e08 with SMTP id p15-20020a05621421ef00b0067559257e08mr13402697qvj.32.1699254823025; Sun, 05 Nov 2023 23:13:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699254823; cv=none; d=google.com; s=arc-20160816; b=h+XTKzDqWTji58PHQLhmgoU3InSo4CoaQTUcC8yJFdwTnaa+9D6LyHI6njbMJ8rKXT yaCMimi/59Cz2SswNA+Bg3vOnstqDnDwzuHS+swvxg7f76bt2BjwYVgtEYg14IRbVmDu tFiw9G2vi14CyWgC/C6FhFOrCKtYsdItLt7KsOaUJfH1JbsjTdBizcTWJ08LctGCBQ58 M42gCsG42RZYGCMdFi/+8HjtDKHcrGpvOJFE0Lch8zqulccfAvZMxaAPq0ohubMV6owm CRtKPnWnuRqp5/2PdIZvIfjNmnn6K5INktgX2h/KYlPFWOudkSQD5rShx06Mr2shWOD7 Tj2Q== 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:cc:to :from:dkim-signature; bh=6qb5wT872vgkkQeZLcaPPTqHv9wq2aCmdY3hodAPUnI=; fh=U+hGNjcWZPeyLe2bTdTFM68h7FRptferheHiMMFpeys=; b=n2QLsEjnt8yiCJoRdX7MndutqrZX9byC1YGCx7he33rvj/GK3w7H4IUVSnqdFvzGYY l9srWVHFSMaMFEGDbk6+r1KqnMqv9qIB8QasQzMyrH7qHNLP2AULyY/xnLUSEatcO7SD DkkiDZN6jFxnvdQWX/jmOsLe6gli6f/WVmkc/qxKB08Y6pwc+nyD3XqlO+R6QoBAsFld lNhqvAlUA0vSzqfFF9jkpYQsKXaqbLGylfd5pPn1kSmq36VNMtPegJTlWp2Upn3dyKzi XE7E6cUKkEB18uba6jzgOPmOILtYBkKkwN/i1+SVleKtZS9imN1QnoQHzuAsxXlBvUn6 IDew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ts86OAMA; 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 l7-20020ad44d07000000b0065af7163b61si5130193qvl.82.2023.11.05.23.13.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Nov 2023 23:13:43 -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=Ts86OAMA; 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 1qztg1-0006Lm-UK; Mon, 06 Nov 2023 02:05:37 -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 1qztd7-0000yY-HK for qemu-devel@nongnu.org; Mon, 06 Nov 2023 02:02:44 -0500 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qztcu-00021P-0F for qemu-devel@nongnu.org; Mon, 06 Nov 2023 02:02:36 -0500 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6c396ef9a3dso1447386b3a.1 for ; Sun, 05 Nov 2023 23:02:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699254142; x=1699858942; 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=6qb5wT872vgkkQeZLcaPPTqHv9wq2aCmdY3hodAPUnI=; b=Ts86OAMAH5KTXJeC6B1SuVz9wZl1HA8nhWu3fm7/B0SY5ICoi572s+DBX7Rq9HI6w4 oSRvqI6E9+sWqW5aw/R5FeKLw1MQ2BCeAYd2I3uRYCG2QtROXBHsJ1kQEk9R7VJmrFja HbIs3I0iji3Tp9kG3hO9shUoz7ZWX0SarHmJhXfx6gkYkcdmH78SxVGNb9aRoX1QgEFQ OAHcJm5F5V9mITNWGW7oJx6quaN9Uj/qBOhFyRHFoUb8QzAm4biK6ArJarUaSXt+Qwvo Ev9MRn2GgZykHUgG5KT+zC9eOKFoTUWVOggnLF3oZMEJ6kwNcLUpcnvM3BYUmTx/SPjs lZvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699254142; x=1699858942; 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=6qb5wT872vgkkQeZLcaPPTqHv9wq2aCmdY3hodAPUnI=; b=EiCjKQSpI7mkbPb4mc/m84smZ0975MUfUDAJq+u1pu/kfzOu/j7kTuwtHWyLuscNnn NSH+x/dnFFj01WPqmRITk2kLrGzbEtWbS6KME4Geo23HTi9VAOsDPyLs651ntm/K4wE+ c6RLfgGoQxhKx0wR1SYeALXyQz0z7iClf+/Xe6pD1bxymWJ9aKOjsL91H3F9JuNffWd4 ZI0+TK+n63QGrKseigvdBKdQkjCWkIoWQ/WXdztukXw+kzCUG2epH8qj1afoHgZXzNMO b7Eqk5JvjT0OjJAMS8EMEiKiP9I/2ai40vKuJp1CgvaokTwHPGerI0hpVgoDRZ9/yxcT RLOQ== X-Gm-Message-State: AOJu0YxTyZ6qKIzAx+dfxSXMLKgrKNQMMX7LEeE0Mt1BgMV2QEv/ek78 wzIIybGY9X+Ju0SxlrypGQMHtDzNBBepAZaSgbg= X-Received: by 2002:a05:6a20:daaa:b0:181:a5a7:291d with SMTP id iy42-20020a056a20daaa00b00181a5a7291dmr12622865pzb.6.1699254142249; Sun, 05 Nov 2023 23:02:22 -0800 (PST) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id 8-20020a17090a194800b0027d88387287sm5319650pjh.51.2023.11.05.23.02.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 23:02:21 -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 62/71] hw/misc/macio: Constify VMState Date: Sun, 5 Nov 2023 22:58:18 -0800 Message-Id: <20231106065827.543129-63-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 Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x429.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 }