From patchwork Tue Dec 20 14:25:18 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: 635462 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2946700pvb; Tue, 20 Dec 2022 06:28:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXsvUQK3zYl2D5gcc3VEADBH/jdoXtnE+NdQRquHMHuja0AafzUVUAJR5rgAaY+NC3FVDtWr X-Received: by 2002:a05:6214:5446:b0:4c7:1ebf:717c with SMTP id kz6-20020a056214544600b004c71ebf717cmr16370534qvb.7.1671546502265; Tue, 20 Dec 2022 06:28:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671546502; cv=none; d=google.com; s=arc-20160816; b=cOQrHr7TrxkIwi/2niK3USE9tN8ktSnZFaHtUZ87FVF0VHrfr5dnaqInbjR+s+dY6N DUBYyWe13jDOi/O31kn7vQMwvTjc8215/z5T4dNGrJMtbXFFFGEt4friUHEyBtF233VE w3Cc7bHnl4OdhCR6RrnzW0i0BwjrphcP8k1deMIsU9R17x0dMPbNKx+yzT2QsVMG2WIi 1BhWlYHPOoRH/h/DM/Ev+eAvpZJAf5bcEAX/k5xyQ27cH4Rhl6BY9RPdEngiRrtzlZ8F 32z8jG7qkQcy4E8Sb7k8gS59lX/vZdJ2oI3ckBOM5hw/YCE5C9Y0euuB8qc5vkGKMctz ljcQ== 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=YZacuc6hkXuywYHHFZgq2CU0UxEHNQQJhCq+mOWh6sc=; b=SH55K3J/ZRoy8W2QoqjTSbNqpoS3w/bjYnIO2agSDBTczuFmtkoZ1ood47+/6UBLBL OrjtvezLC1SY6CAQTET5kpj+wqp4pbW4VbUikVeROtB6BtAZzDNsDlSP/1tBeOP6R9ox Ckf/0hvuYZWQKnlGSDA/0jso6NEKXIZf1wuue3GJn/qUVjbpm7RQpcN1zERXUouxLCWo nOttuzHUsD0/cdw54mNyXo7A85iwRZofFL8jh04jqMu9qKDl2ym/9nRR63FNgqd1zBUs 4N7YaVhig2B7eyOuW/h8wzxKOS6Kv5SZRs735lNbqmNJBi/wGBEREPsS4H5gMVQQTg5t KAUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oK90c5EM; 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 n5-20020a05620a294500b006fcab4da043si5290768qkp.681.2022.12.20.06.28.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Dec 2022 06:28:22 -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=oK90c5EM; 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 1p7dYq-0002qN-Ot; Tue, 20 Dec 2022 09:25:40 -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 1p7dYh-0002jQ-Vs for qemu-devel@nongnu.org; Tue, 20 Dec 2022 09:25:36 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p7dYg-00077H-FI for qemu-devel@nongnu.org; Tue, 20 Dec 2022 09:25:31 -0500 Received: by mail-wm1-x335.google.com with SMTP id m5-20020a7bca45000000b003d2fbab35c6so8923687wml.4 for ; Tue, 20 Dec 2022 06:25:30 -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=YZacuc6hkXuywYHHFZgq2CU0UxEHNQQJhCq+mOWh6sc=; b=oK90c5EMFqv9gleN3CJ9GTFswxADLz1WoH7MV9oKWkECdkw9D3mfmpSY/zKO28OsZW LJpqB/Oq5owlBGdje5kthNYVHwRi6Wc3zQCUjQRlgUPB3Xa0uH3csLCS9h9rnOpPCezt 1F9IS30DxtaMELeod4B7k5Ysf7rPHuy7JJo8yl7jYkZDMaFbt+hjVAco/rcTEKbvyy5F UQhhatKoDxMXzzDooP2pi55ASEjpB5NmE0/tisFbFw57tVrsyQIvybpKH72QXCmpzbgw iKvCdttEqtry7gZVahF64ADPde2hNITkyvWeozSEDLDTCBA8YTT3msRrZkPqod43Fi9r QQkw== 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=YZacuc6hkXuywYHHFZgq2CU0UxEHNQQJhCq+mOWh6sc=; b=LaPVXgRTVv8wRr3Ue58FI7hE+Lr1G8F4c7IlznZ54yP3EH/PaijFwMyy4Um5DbJ0S5 GPWaZrGSH5R8+TfL9jymc5nRZIbHda0GDAlw5DMuvhe6dhXiqFSaVo15BWQeUIzmu/rP iN13D9kSK1MwATWlJ0jRwkyop3AhlodtmgVZNFRRjTh2AM+73ZFCbhrT/01Hmdl7X9aj 3X+fela8cZVb/aPlXNLAmpLB+aoq0lNCr7F9CyMcc8LircJuTZ6CNjk9EfrHQSbXDIPv 4yaTtq99iB52dNnBARdnae51oBAm26mhKb0bPFOI6OhBIQYcJMiZCAcJJe35GzEWC4PG sG6Q== X-Gm-Message-State: ANoB5pnvq52giTgHsFTYgHalzzoOBwlX/tHsFm3u29Q6wgHKH4QsD+FD +nPOqazGERxdOjPyh+s7GkGWnIVvZ/vHIkYMGOY= X-Received: by 2002:a7b:ca45:0:b0:3d2:fbab:3609 with SMTP id m5-20020a7bca45000000b003d2fbab3609mr14806088wml.27.1671546328774; Tue, 20 Dec 2022 06:25:28 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id 189-20020a1c02c6000000b003cfd58409desm23303881wmc.13.2022.12.20.06.25.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 20 Dec 2022 06:25:27 -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 1/3] hw/input/tsc2xxx: Constify set_transform()'s MouseTransformInfo arg Date: Tue, 20 Dec 2022 15:25:18 +0100 Message-Id: <20221220142520.24094-2-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::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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=unavailable 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 The pointed MouseTransformInfo structure is accessed read-only. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/input/tsc2005.c | 2 +- hw/input/tsc210x.c | 3 +-- include/hw/input/tsc2xxx.h | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/input/tsc2005.c b/hw/input/tsc2005.c index 14698ce109..555b677173 100644 --- a/hw/input/tsc2005.c +++ b/hw/input/tsc2005.c @@ -523,7 +523,7 @@ void *tsc2005_init(qemu_irq pintdav) * from the touchscreen. Assuming 12-bit precision was used during * tslib calibration. */ -void tsc2005_set_transform(void *opaque, MouseTransformInfo *info) +void tsc2005_set_transform(void *opaque, const MouseTransformInfo *info) { TSC2005State *s = (TSC2005State *) opaque; diff --git a/hw/input/tsc210x.c b/hw/input/tsc210x.c index df7313db5d..fdd5ff87d9 100644 --- a/hw/input/tsc210x.c +++ b/hw/input/tsc210x.c @@ -1176,8 +1176,7 @@ I2SCodec *tsc210x_codec(uWireSlave *chip) * from the touchscreen. Assuming 12-bit precision was used during * tslib calibration. */ -void tsc210x_set_transform(uWireSlave *chip, - MouseTransformInfo *info) +void tsc210x_set_transform(uWireSlave *chip, const MouseTransformInfo *info) { TSC210xState *s = (TSC210xState *) chip->opaque; #if 0 diff --git a/include/hw/input/tsc2xxx.h b/include/hw/input/tsc2xxx.h index 5b76ebc177..00eca17674 100644 --- a/include/hw/input/tsc2xxx.h +++ b/include/hw/input/tsc2xxx.h @@ -30,12 +30,12 @@ uWireSlave *tsc2102_init(qemu_irq pint); uWireSlave *tsc2301_init(qemu_irq penirq, qemu_irq kbirq, qemu_irq dav); I2SCodec *tsc210x_codec(uWireSlave *chip); uint32_t tsc210x_txrx(void *opaque, uint32_t value, int len); -void tsc210x_set_transform(uWireSlave *chip, MouseTransformInfo *info); +void tsc210x_set_transform(uWireSlave *chip, const MouseTransformInfo *info); void tsc210x_key_event(uWireSlave *chip, int key, int down); /* tsc2005.c */ void *tsc2005_init(qemu_irq pintdav); uint32_t tsc2005_txrx(void *opaque, uint32_t value, int len); -void tsc2005_set_transform(void *opaque, MouseTransformInfo *info); +void tsc2005_set_transform(void *opaque, const MouseTransformInfo *info); #endif 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; From patchwork Tue Dec 20 14:25:20 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: 635461 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2946071pvb; Tue, 20 Dec 2022 06:27:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf5q8GzpT9csNsGeoOdri7JYIPWvWW1Su0wWvJMvHHc5rsuqUQcHm+awsTrc7O4FcCaKmlBX X-Received: by 2002:a05:622a:5d8f:b0:3a7:ea57:bf20 with SMTP id fu15-20020a05622a5d8f00b003a7ea57bf20mr56886769qtb.13.1671546420906; 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=Mgws3xvt/iJIfJ9h4zbkT3VpgNSpjI840ijNdYsEBiZA7p4/CCN1t+iYz/DQ9BN132 aMUIaWxEaE4OEh6H++HW18NxJzKYrK8Gt6b0v4QpCfHup6YaFbcSpBNnX3Qdl07Jo09b qCFYDSEI1VmCpA/xfucBg9r2w06KZPa/j8VY0WGFlpr6Bj6puz2hzYMPZfCL2RC12q31 pQyxK4N1VJd0lsAEuzSUW//5POF8nDXLaycNPQEozBWXF4wqZS3ooC7/r6q1JMyHGMUp MLpWSWwXxqRsHQ9fQnQaucCZkT4E3Cdwnw8mekj5jqarhP2MUdt7tFumCSR/7lmcF3LG Z2Kg== 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=wS5CxhmEHaWzfXfeaPCFtcR9LUEn6cDWq+iuQTZsc7I=; b=0XKVRjUwQI71VxHkg6qVQg/DHHfUN/SrCPqxiDsE0TaQpCyYm8JX0W8sREm08W24Lm mO68fW7EQ5VnH1+oC478UgP9o4qWdmauRuFSvN+ZULhE1nB8MEeneC5b5/PJmmF8DKGc ltt3xBqnAYTEMNTnzf5vc7vo+Z/cwwqqSj51HTQR/qr4QS9yzP4iOxLJ/1LJCQ1RSyo7 dvjmuW8dLrw+DR1XO+X67Mownc4o+3pGJvigRTe0gyO6oDPPIeIctp6adnxdZVaDm2oP O1WZdjrvCimCzD3Z6cg4SB7bJGCHbH4f4ja0J5mfI/UIB595FCUsuy1Yg/s72B092RIk /KDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l1jlxIsv; 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 c17-20020ac86611000000b003a7e5c7d1d7si5076480qtp.630.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=l1jlxIsv; 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 1p7dZA-000399-04; Tue, 20 Dec 2022 09:26:00 -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 1p7dYs-0002tT-PC for qemu-devel@nongnu.org; Tue, 20 Dec 2022 09:25:46 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p7dYr-0007Di-7M for qemu-devel@nongnu.org; Tue, 20 Dec 2022 09:25:42 -0500 Received: by mail-wr1-x42f.google.com with SMTP id h7so11897034wrs.6 for ; Tue, 20 Dec 2022 06:25:39 -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=wS5CxhmEHaWzfXfeaPCFtcR9LUEn6cDWq+iuQTZsc7I=; b=l1jlxIsvfSo8PNFA5hwP6NUH44msHURNTzOD27kGZjcfS8tz04zr5cB0/gSRh3MzOn bIakl97bmFtQ4EYKu5r7BRTia9siCUhuA8ATdoMz1RWjaH4MzOmskkbanHr8fQAc5G2k Bqh/ZbSlwj2Cu7e59dFPp/7jBGyhCUDz8QpxmgRgYdCcsLzrEz7yZluLtPp+jg+3MlNy 7Pn/K5ZTnzKfR/6+2G75pgtgRpZGBlNLFEH1B4xHNqga6zjKD683KC4A1NSNttQxPo7Z prccLjlBNnIjaPNsJ6gwOeYwwFKLk60j7eqWfWS8Ly4z6LOCSacFsKO4Y8CG0KCyQqW9 S/GA== 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=wS5CxhmEHaWzfXfeaPCFtcR9LUEn6cDWq+iuQTZsc7I=; b=rCoftwkh5aQSEZ0bH5/LwL3rtgndNhnuDlWgGHd7rj3e6wKliAw2xN00BZO08R9Ovz 3xY01PeKoPaeHOID9BCnNbcx5b8eXw0jjKaYtCBG382Lw8T3D8aH88iIbvauYmMu8A1h yiaxU8nlxH3fYaiU8v99XwCRe0/50pM4MkCD6fwptkdm29a6Zs5eeQcISdrscLkyXwm9 HjUAh8zCO3JxZm6Q6fUS0lVNtNM/FFz0Nt3yUjIRkOtpaX5WikhWLZeJg3iMVkYIcrEQ jAygbk8XhaE6W8ubXSjOcxT3CTqaK8584eyH8ZXm7965aaxfSn0aBFtP8yGUMpysqP7E oIIg== X-Gm-Message-State: AFqh2koKlYe+jB59zF3mAr6taLoLq52vkjWNKCpEOguK5cN3sF8J8MbG mWBzNVUCgzLf9HaFiEDn8p41WgJEeH+LUQ8aHEw= X-Received: by 2002:adf:a15b:0:b0:242:61ab:5979 with SMTP id r27-20020adfa15b000000b0024261ab5979mr2302875wrr.71.1671546338972; Tue, 20 Dec 2022 06:25:38 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n17-20020a05600c4f9100b003d351a9db76sm11175015wmq.30.2022.12.20.06.25.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 20 Dec 2022 06:25:38 -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 3/3] hw/arm/nseries: Silent -Wmissing-field-initializers warning Date: Tue, 20 Dec 2022 15:25:20 +0100 Message-Id: <20221220142520.24094-4-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::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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=unavailable 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 Silent when compiling with -Wextra: ../hw/arm/nseries.c:1081:12: warning: missing field 'line' initializer [-Wmissing-field-initializers] { NULL } ^ Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/nseries.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c index 2ff29f52e2..c9df063a08 100644 --- a/hw/arm/nseries.c +++ b/hw/arm/nseries.c @@ -1078,7 +1078,7 @@ static const struct omap_gpiosw_info_s { "headphone", N8X0_HEADPHONE_GPIO, OMAP_GPIOSW_TYPE_CONNECTION | OMAP_GPIOSW_INVERTED, }, - { NULL } + { /* end of list */ } }, n810_gpiosw_info[] = { { "gps_reset", N810_GPS_RESET_GPIO, @@ -1099,7 +1099,7 @@ static const struct omap_gpiosw_info_s { "slide", N810_SLIDE_GPIO, OMAP_GPIOSW_TYPE_COVER | OMAP_GPIOSW_INVERTED, }, - { NULL } + { /* end of list */ } }; static const struct omap_partition_info_s { @@ -1113,16 +1113,14 @@ static const struct omap_partition_info_s { { 0x00080000, 0x00200000, 0x0, "kernel" }, { 0x00280000, 0x00200000, 0x3, "initfs" }, { 0x00480000, 0x0fb80000, 0x3, "rootfs" }, - - { 0, 0, 0, NULL } + { /* end of list */ } }, n810_part_info[] = { { 0x00000000, 0x00020000, 0x3, "bootloader" }, { 0x00020000, 0x00060000, 0x0, "config" }, { 0x00080000, 0x00220000, 0x0, "kernel" }, { 0x002a0000, 0x00400000, 0x0, "initfs" }, { 0x006a0000, 0x0f960000, 0x0, "rootfs" }, - - { 0, 0, 0, NULL } + { /* end of list */ } }; static const uint8_t n8x0_bd_addr[6] = { N8X0_BD_ADDR };