From patchwork Thu Dec 21 03:16:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 756923 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp686620wrw; Wed, 20 Dec 2023 19:21:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IE84JuTIv8auXPongQAsjaKiy+8Rd1Qk6NegKmC5kaD4vVazMWURmkXkR9cLzan6V20oWP6 X-Received: by 2002:a05:620a:880b:b0:781:16ce:ec51 with SMTP id qj11-20020a05620a880b00b0078116ceec51mr2152420qkn.95.1703128867191; Wed, 20 Dec 2023 19:21:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703128867; cv=none; d=google.com; s=arc-20160816; b=RFK3k4bEPQoXd7YGNdKOavTmk5xyq5joqdzZHIY79V74b2M1nuRRxs7594jXuUheA0 tR7/5VFM+F3KcJIlNPH6lYrQOfxyl3qnNDtYWS9z6kG0Iq75xMxBQJUR6t2xBrYXb9hd UUoF46x1ODOkaH4nk31KljxdfNcUzi2Y4FQxPMlMJ9e3IiNvWJAiUWCTyAs2KzIgNxIy vXn2Dwa5ZBI8lO3RBD/TeN5Yz4EsIC5xScc/U5huueaZ66c0izkFc3duAe2KEraaFWFX 9+/gBY0eC09/GF1V1ORaDIEQ/7/r1FZiHFdNKPF0VLLQ1byu3RNFoDdwSINT1bScUgob aARw== 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=ex0sMAx8rqtWa5iF1okc4nAfkaRkYqLLJJTlpZ+IXRU=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=OJKs5mMy6UqzI/p3fSc3q/M0kwut4ppMMWeMefKaUEVeXeHdEk1bJZBqzXEFK/nSRI Jlfr1/a1KL710wdCWGOzNLAkf9r0UFH5Tjd2ysIT9x7pyU4/dr1NASdpxrFUPig91HMz Ch1fZ//wcjWIdMNTVUBe/2gNP7Sgw+hfOjhVJ2Y5Yufaj30NfOKRPWFJgKZSAd0jQKgq t4kjE6LKlZyNCHdCXVz2LCqhU3IaKeXMK5YNgYdD/1FCTFlp9j2dRxCTwUWLxE0hbt38 HB9F5CH141v+uqBf3KdBuPPAfU9/QeMEq7NK7brB8CcS82X1+to+X2uY5WzpJ3rNTxrr YNKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="tz8p/yVU"; 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 vu22-20020a05620a561600b0077dc4c00817si1189658qkn.436.2023.12.20.19.21.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Dec 2023 19:21:07 -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="tz8p/yVU"; 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 1rG9aQ-0003OZ-Jk; Wed, 20 Dec 2023 22:19:02 -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 1rG9aO-00035b-5j for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:19:00 -0500 Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rG9aM-000417-36 for qemu-devel@nongnu.org; Wed, 20 Dec 2023 22:18:59 -0500 Received: by mail-qk1-x72b.google.com with SMTP id af79cd13be357-78106c385a1so20237085a.0 for ; Wed, 20 Dec 2023 19:18:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703128737; x=1703733537; 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=ex0sMAx8rqtWa5iF1okc4nAfkaRkYqLLJJTlpZ+IXRU=; b=tz8p/yVURfk6ObbFHQwgDsD/uVn2OQC9Gw9oZetB1f9Kk9aIyLNJbtyZ1vq5jBM0uz ZTtzNtYVrr1w1zH+ZMeDUh7GGvQoFwxlU0t34md6irjh+zc7p7OnxZhxSqWuc9oVP1c3 qjkp/by0lttup1DKI5/SSPWRx9Te0NBN4eSgU8uO4INteIC3Znl3cCMcovW6sD1XkgKy ACZxrTxu2C+q1Of7fuNiev77QLkM1bPaKzf8LVPlt5nGh4nAi1l1mjtx+g36dJKhKW0U oPRzTVJEIIORnG9c42OAK14uzG6tzl38zfUOFPfeqAEBpkyoujcEZdagzCVujSgrsfsq DDvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703128737; x=1703733537; 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=ex0sMAx8rqtWa5iF1okc4nAfkaRkYqLLJJTlpZ+IXRU=; b=OzpLAaS0KIGZ5OjwDivi5Vq7dVgZCUOE1dQ4MscNYNw8pgsGzCENMDORJRZGZ1Xkh8 KoZ40N00w8ULlefOFIld8OsEzvJkR9TrDSh9V8F+jmV3uILt3qbFsdPyY72FMiYc38pQ jC5oTJHTw65dFj4WIsA7gb4GBk0yly/ysmffX5bFS1Vy8coziLtywiRB20ER5HzNB3co wnDAD0wTZipRU9P5a/pW0q76d7pXa3ZHbKCyUcIKgcKLlcFAYGK3L4OtStrgvJFV/sJ3 hQuuO6RAa7+6OsGfkc5ur1fn9ZqlHbn9kNMbVQwdbJGZNThOBBb+z+d86plTwFnHlcC4 aOTQ== X-Gm-Message-State: AOJu0YxS8KTo6PdzRpY9ew3KD0TpVxN17/jZ23yuEl1KK7AMmVL42aMr Kfhf7zawJnA8nYwnXI9UOJrAt7XOfDQfYBpwpkcESnuA X-Received: by 2002:a05:620a:424f:b0:780:e4b3:7cd8 with SMTP id w15-20020a05620a424f00b00780e4b37cd8mr7505735qko.102.1703128737092; Wed, 20 Dec 2023 19:18:57 -0800 (PST) Received: from stoup.. ([172.58.139.164]) by smtp.gmail.com with ESMTPSA id n8-20020a05620a294800b0078116d55191sm360808qkp.130.2023.12.20.19.18.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 19:18:56 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 28/71] hw/gpio: Constify VMState Date: Thu, 21 Dec 2023 14:16:09 +1100 Message-Id: <20231221031652.119827-29-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::72b; envelope-from=richard.henderson@linaro.org; helo=mail-qk1-x72b.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/gpio/aspeed_gpio.c | 4 ++-- hw/gpio/bcm2835_gpio.c | 2 +- hw/gpio/gpio_key.c | 2 +- hw/gpio/imx_gpio.c | 2 +- hw/gpio/max7310.c | 2 +- hw/gpio/mpc8xxx.c | 2 +- hw/gpio/npcm7xx_gpio.c | 2 +- hw/gpio/nrf51_gpio.c | 2 +- hw/gpio/pl061.c | 2 +- hw/gpio/sifive_gpio.c | 2 +- hw/gpio/zaurus.c | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/hw/gpio/aspeed_gpio.c b/hw/gpio/aspeed_gpio.c index 1e267dd482..c1781e2ba3 100644 --- a/hw/gpio/aspeed_gpio.c +++ b/hw/gpio/aspeed_gpio.c @@ -1067,7 +1067,7 @@ static const VMStateDescription vmstate_gpio_regs = { .name = TYPE_ASPEED_GPIO"/regs", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(data_value, GPIOSets), VMSTATE_UINT32(data_read, GPIOSets), VMSTATE_UINT32(direction, GPIOSets), @@ -1090,7 +1090,7 @@ static const VMStateDescription vmstate_aspeed_gpio = { .name = TYPE_ASPEED_GPIO, .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_STRUCT_ARRAY(sets, AspeedGPIOState, ASPEED_GPIO_MAX_NR_SETS, 1, vmstate_gpio_regs, GPIOSets), VMSTATE_UINT32_ARRAY(debounce_regs, AspeedGPIOState, diff --git a/hw/gpio/bcm2835_gpio.c b/hw/gpio/bcm2835_gpio.c index c995bba1d9..6bd50bb0b6 100644 --- a/hw/gpio/bcm2835_gpio.c +++ b/hw/gpio/bcm2835_gpio.c @@ -284,7 +284,7 @@ static const VMStateDescription vmstate_bcm2835_gpio = { .name = "bcm2835_gpio", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT8_ARRAY(fsel, BCM2835GpioState, 54), VMSTATE_UINT32(lev0, BCM2835GpioState), VMSTATE_UINT32(lev1, BCM2835GpioState), diff --git a/hw/gpio/gpio_key.c b/hw/gpio/gpio_key.c index 74f6138356..61bb587058 100644 --- a/hw/gpio/gpio_key.c +++ b/hw/gpio/gpio_key.c @@ -45,7 +45,7 @@ static const VMStateDescription vmstate_gpio_key = { .name = "gpio-key", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_TIMER_PTR(timer, GPIOKEYState), VMSTATE_END_OF_LIST() } diff --git a/hw/gpio/imx_gpio.c b/hw/gpio/imx_gpio.c index c7f98b7bb1..e53b00d951 100644 --- a/hw/gpio/imx_gpio.c +++ b/hw/gpio/imx_gpio.c @@ -277,7 +277,7 @@ static const VMStateDescription vmstate_imx_gpio = { .name = TYPE_IMX_GPIO, .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(dr, IMXGPIOState), VMSTATE_UINT32(gdir, IMXGPIOState), VMSTATE_UINT32(psr, IMXGPIOState), diff --git a/hw/gpio/max7310.c b/hw/gpio/max7310.c index 4470cfe985..86315714fb 100644 --- a/hw/gpio/max7310.c +++ b/hw/gpio/max7310.c @@ -155,7 +155,7 @@ static const VMStateDescription vmstate_max7310 = { .name = "max7310", .version_id = 0, .minimum_version_id = 0, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_INT32(i2c_command_byte, MAX7310State), VMSTATE_INT32(len, MAX7310State), VMSTATE_UINT8(level, MAX7310State), diff --git a/hw/gpio/mpc8xxx.c b/hw/gpio/mpc8xxx.c index cb42acb6da..0b3f9e516d 100644 --- a/hw/gpio/mpc8xxx.c +++ b/hw/gpio/mpc8xxx.c @@ -48,7 +48,7 @@ static const VMStateDescription vmstate_mpc8xxx_gpio = { .name = "mpc8xxx_gpio", .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(dir, MPC8XXXGPIOState), VMSTATE_UINT32(odr, MPC8XXXGPIOState), VMSTATE_UINT32(dat, MPC8XXXGPIOState), diff --git a/hw/gpio/npcm7xx_gpio.c b/hw/gpio/npcm7xx_gpio.c index 3376901ab1..6e70ac1f24 100644 --- a/hw/gpio/npcm7xx_gpio.c +++ b/hw/gpio/npcm7xx_gpio.c @@ -377,7 +377,7 @@ static const VMStateDescription vmstate_npcm7xx_gpio = { .name = "npcm7xx-gpio", .version_id = 0, .minimum_version_id = 0, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(pin_level, NPCM7xxGPIOState), VMSTATE_UINT32(ext_level, NPCM7xxGPIOState), VMSTATE_UINT32(ext_driven, NPCM7xxGPIOState), diff --git a/hw/gpio/nrf51_gpio.c b/hw/gpio/nrf51_gpio.c index 08396c69a4..ffc7dff796 100644 --- a/hw/gpio/nrf51_gpio.c +++ b/hw/gpio/nrf51_gpio.c @@ -280,7 +280,7 @@ static const VMStateDescription vmstate_nrf51_gpio = { .name = TYPE_NRF51_GPIO, .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(out, NRF51GPIOState), VMSTATE_UINT32(in, NRF51GPIOState), VMSTATE_UINT32(in_mask, NRF51GPIOState), diff --git a/hw/gpio/pl061.c b/hw/gpio/pl061.c index 899be861cc..86f2383655 100644 --- a/hw/gpio/pl061.c +++ b/hw/gpio/pl061.c @@ -87,7 +87,7 @@ static const VMStateDescription vmstate_pl061 = { .name = "pl061", .version_id = 4, .minimum_version_id = 4, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(locked, PL061State), VMSTATE_UINT32(data, PL061State), VMSTATE_UINT32(old_out_data, PL061State), diff --git a/hw/gpio/sifive_gpio.c b/hw/gpio/sifive_gpio.c index 78bf29e996..995a43c795 100644 --- a/hw/gpio/sifive_gpio.c +++ b/hw/gpio/sifive_gpio.c @@ -326,7 +326,7 @@ static const VMStateDescription vmstate_sifive_gpio = { .name = TYPE_SIFIVE_GPIO, .version_id = 1, .minimum_version_id = 1, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT32(value, SIFIVEGPIOState), VMSTATE_UINT32(input_en, SIFIVEGPIOState), VMSTATE_UINT32(output_en, SIFIVEGPIOState), diff --git a/hw/gpio/zaurus.c b/hw/gpio/zaurus.c index 7cf52a5041..5884804c58 100644 --- a/hw/gpio/zaurus.c +++ b/hw/gpio/zaurus.c @@ -222,7 +222,7 @@ static const VMStateDescription vmstate_scoop_regs = { .version_id = 1, .minimum_version_id = 0, .post_load = scoop_post_load, - .fields = (VMStateField[]) { + .fields = (const VMStateField[]) { VMSTATE_UINT16(status, ScoopInfo), VMSTATE_UINT16(power, ScoopInfo), VMSTATE_UINT32(gpio_level, ScoopInfo),