From patchwork Tue Dec 20 14:25:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 635460 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2946063pvb; Tue, 20 Dec 2022 06:27:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf4v0LeAeObMdU591mzDRuROJHxNRjC3mqHiOpQCgh3r+WDh3SUhimpZs4tptDm2wZbnjvzO X-Received: by 2002:a05:622a:4012:b0:39c:da21:6c0e with SMTP id cf18-20020a05622a401200b0039cda216c0emr28704493qtb.16.1671546420200; Tue, 20 Dec 2022 06:27:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671546420; cv=none; d=google.com; s=arc-20160816; b=Heg5YTf+cGFIkQHBtIEKenzCkjErraycHbuZaj6NWyqfpk0nsU3SfWe+HLCNCUqzp5 WKs3uJDBqo0LQw5ygJ7PUYFwomD2w94VIIt+ldaPUPywMuaMmU+fwlNcPM8ITjjEOAUv Y21G+3xyFVed5FKcx/ONbLz7vRJ+3zjKQ+eAUKKkEwrBZeQV8/ic3rRq7HzJc0e1W+ar Ac6hes/0YK65YC3oUuGi9mt1NP2rFSYWI7s2rULGbJTzPOd/CAMo2daISc8oF+p7IaFz w5R5tlUMRluBQpnrsM9ichMXUxbEihG+XuA5/yyTsXc8jyow6nIf2C/aGEc9G0R8SxxZ 9QYA== 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=F2fp1/YYUdGWYu3hiUNYQ+xzlt+cNGmiBsfUbTz1rcI=; b=PgclM9c0aYzv+BmxFV3AoxAmboTWFL5rrO4rjGUL+GVhDYOdYVx5bU+DJNYSoUgE8r 1N35XuVAfS30v0oXZNR8bbq6EIaWU7W0s6skb4huiX05D4UN82pnX9cmSW7UOkjtxUoL +5nChUsY+nyV0M7l+HGj8hhSQ9D4TXfG6+8aede/miPbK/TtxKGWUDWbfu2I6X8ml0zf XwFbVkDj8iFVoWkGtbi7Y6ta2NqyU54g/CS0pKu41MCoTLoXHGCM9aPGG3u5fGBhkcvy Ob4iSofgBppUzg6nRF8R5Q9neOGe7jLebZbFeXFBvofsESDIdqAMPLIzKoRv3/tDy44Y 11fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ljfl/ppp"; 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 m9-20020a05620a290900b006cf28677379si5565472qkp.643.2022.12.20.06.27.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Dec 2022 06:27:00 -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="ljfl/ppp"; 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 1p7dZ9-00038v-Pq; Tue, 20 Dec 2022 09:25:59 -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 1p7dYm-0002kM-SQ for qemu-devel@nongnu.org; Tue, 20 Dec 2022 09:25:36 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p7dYl-0007Bq-7U for qemu-devel@nongnu.org; Tue, 20 Dec 2022 09:25:36 -0500 Received: by mail-wr1-x430.google.com with SMTP id o5so11910270wrm.1 for ; Tue, 20 Dec 2022 06:25:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=F2fp1/YYUdGWYu3hiUNYQ+xzlt+cNGmiBsfUbTz1rcI=; b=ljfl/pppcwKBkleG4/Dc9kPUqxm13XD2Mrleelh/o4EvQlB25zBUaVbKbZN2K39es+ rxsTFvUA2Ja9O3dDuGUjTDvbxALW81tK7PftZmmOF1pLk6n2pLVAqgEkWln8aoyPI7Sh preX8qvQ3se3zFHFenaHRl3s0EQIURiZuDpHkfwj/LGZtSnSz+4oFW9+Ha5dUrJULXZ1 FMRqipFjb30yFUzqAi/1/NJwaW2ZBL5QDmyVkngqGsQ2pVq1P5wQZQDaJ/r137oyXkzi 2I8JlDlXGAoJKNpKfoR62suk6/GO+tRJUci6Zi1cSSnet6ehDB73hOzwVHgx45i7rrxy sEZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=F2fp1/YYUdGWYu3hiUNYQ+xzlt+cNGmiBsfUbTz1rcI=; b=mGb+HMYEwZHUXybw0/57/A0q9epcUhxVwJddNfqmgCkPrTH6v6e9ggWUbh4hZOdirQ gsRoGPE3GbUG5J4eBqT3nMrHkNfD14E2xKSssL7l5ns0UJVSEjWltrURceLskyvH9dYx /5e9WtAbultirri1scRL/wdAu+qDnBDP3s7tPC1wRYwgo5hm74gWrJ0fkDFQDGv5WLJX lA42YYhIetysNT3W7mgUYkB6Hgu78YMYyraAQ/PEr9eZEf3Nxs5QSnEGzLy5uRxiOPmd 7/xfTnFYSPQ682GQaHkg/xd22QonB6EqOIE19wZIuXqYFl+aNXM40CxTezDyYI3o8FpF Na2A== X-Gm-Message-State: ANoB5pksxnQEDjCA0xy1f+LUS4OVAyXhyBFWe4AOca16+94zNCuD2lAA RZc+7STQdCDFDO5RITm74UqVstUxYxeOJpLXFWw= X-Received: by 2002:adf:ea8f:0:b0:242:70f1:2134 with SMTP id s15-20020adfea8f000000b0024270f12134mr38863853wrm.60.1671546333661; Tue, 20 Dec 2022 06:25:33 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id bq1-20020a5d5a01000000b00236545edc91sm12853530wrb.76.2022.12.20.06.25.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 20 Dec 2022 06:25:33 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 2/3] hw/arm/nseries: Constify various read-only arrays Date: Tue, 20 Dec 2022 15:25:19 +0100 Message-Id: <20221220142520.24094-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221220142520.24094-1-philmd@linaro.org> References: <20221220142520.24094-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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 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: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/arm/nseries.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c index b151113c27..2ff29f52e2 100644 --- a/hw/arm/nseries.c +++ b/hw/arm/nseries.c @@ -230,13 +230,13 @@ static void n8x0_i2c_setup(struct n800_s *s) } /* Touchscreen and keypad controller */ -static MouseTransformInfo n800_pointercal = { +static const MouseTransformInfo n800_pointercal = { .x = 800, .y = 480, .a = { 14560, -68, -3455208, -39, -9621, 35152972, 65536 }, }; -static MouseTransformInfo n810_pointercal = { +static const MouseTransformInfo n810_pointercal = { .x = 800, .y = 480, .a = { 15041, 148, -4731056, 171, -10238, 35933380, 65536 }, @@ -334,7 +334,7 @@ static void n810_key_event(void *opaque, int keycode) #define M 0 -static int n810_keys[0x80] = { +static const int n810_keys[0x80] = { [0x01] = 16, /* Q */ [0x02] = 37, /* K */ [0x03] = 24, /* O */ @@ -810,7 +810,7 @@ static void n8x0_usb_setup(struct n800_s *s) /* Setup done before the main bootloader starts by some early setup code * - used when we want to run the main bootloader in emulation. This * isn't documented. */ -static uint32_t n800_pinout[104] = { +static const uint32_t n800_pinout[104] = { 0x080f00d8, 0x00d40808, 0x03080808, 0x080800d0, 0x00dc0808, 0x0b0f0f00, 0x080800b4, 0x00c00808, 0x08080808, 0x180800c4, 0x00b80000, 0x08080808, @@ -1060,7 +1060,7 @@ static void n8x0_boot_init(void *opaque) #define OMAP_TAG_CBUS 0x4e03 #define OMAP_TAG_EM_ASIC_BB5 0x4e04 -static struct omap_gpiosw_info_s { +static const struct omap_gpiosw_info_s { const char *name; int line; int type; @@ -1102,7 +1102,7 @@ static struct omap_gpiosw_info_s { { NULL } }; -static struct omap_partition_info_s { +static const struct omap_partition_info_s { uint32_t offset; uint32_t size; int mask; @@ -1125,15 +1125,15 @@ static struct omap_partition_info_s { { 0, 0, 0, NULL } }; -static uint8_t n8x0_bd_addr[6] = { N8X0_BD_ADDR }; +static const uint8_t n8x0_bd_addr[6] = { N8X0_BD_ADDR }; static int n8x0_atag_setup(void *p, int model) { uint8_t *b; uint16_t *w; uint32_t *l; - struct omap_gpiosw_info_s *gpiosw; - struct omap_partition_info_s *partition; + const struct omap_gpiosw_info_s *gpiosw; + const struct omap_partition_info_s *partition; const char *tag; w = p;