From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3834DC4363A for ; Mon, 26 Oct 2020 17:28:58 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A9CF22223C for ; Mon, 26 Oct 2020 17:28:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QJ2I4r8N"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="ywDtmDkv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A9CF22223C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4/bZwQkHBgqXm86fR0Q4sCfbFnvVTfgaIrqrfpXSmw0=; b=QJ2I4r8NSDzaGqy0yOhkr9moR YG3ZdUdrkQ5CqbcNd1UP3PzqbCLBalN7hwQyNmVaCXNJmS8KKCDYUKB6cSTUrbEGMVp4isQJIsvAN UtsxdbzeuGDhXs679qaPTM5cw9v4B4lZhkh9cXvOYL+CxhA05NknTREpgT465WIRWeqHDENyevQ+B 1aS2DYLw6vuo7dtoEzUARVVdDeQLDMKUIrtxs6x7nnBtvZFzhpqT8l1EkDUd+kh1OUTMwIjPSBLVr QKO2RXsg6z5cfT+veAbHbtqZCWFbGxdpJyTIDhWu6VPHVwMYDPWzQWX7W/zN03pSJiieO5zwVL4Ra mWgKKyoEg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX6Hc-0002rw-2c; Mon, 26 Oct 2020 17:27:48 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX6HZ-0002rF-4y for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 17:27:45 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 87E9620795; Mon, 26 Oct 2020 17:27:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603733264; bh=z+/j/YaYig656IkZ23rw0JWKnkyWxV7A9Y5NdY6nHDk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ywDtmDkvU1Q8ptUnzU+rYYjjaNmw2EoYuR6FhRL3wH3oIaHiKLuhB5VumO6O3QP9G nsJmQQGOe1BCkVj7VIARRyabMmMx1FeEe+dYD2a4j12RwIFPsiwXl0O/S+MscTXpH7 XEYf6+MAlmoujq2djgwAwz5ypGkOkf7Rp9RepQJ8= Date: Mon, 26 Oct 2020 17:27:38 +0000 From: Will Deacon To: Peter Maydell Subject: Re: [PATCH 4/4] arm64: traps: fix -Woverride-init warnings Message-ID: <20201026172737.GA25131@willie-the-truck> References: <20201026160342.3705327-1-arnd@kernel.org> <20201026160342.3705327-4-arnd@kernel.org> <20201026162314.GA42396@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_132745_271844_B12D5EF3 X-CRM114-Status: GOOD ( 22.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Arnd Bergmann , Gavin Shan , Arnd Bergmann , Marc Zyngier , Catalin Marinas , Will Deacon , lkml - Kernel Mailing List , Mark Brown , James Morse , arm-mail-list , Dmitry Safonov <0x7f454c46@gmail.com>, Amit Daniel Kachhap , Dave Martin , Christoffer Dall Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Oct 26, 2020 at 05:13:30PM +0000, Peter Maydell wrote: > On Mon, 26 Oct 2020 at 16:23, Mark Rutland wrote: > > On Mon, Oct 26, 2020 at 05:03:31PM +0100, Arnd Bergmann wrote: > > > From: Arnd Bergmann > > > > > > There are many warnings in this file when we re-enable the > > > Woverride-init flag: > > > > > > arch/arm64/kernel/traps.c:704:26: warning: initialized field overwritten [-Woverride-init] > > > 704 | [ESR_ELx_EC_UNKNOWN] = "Unknown/Uncategorized", > > > | ^~~~~~~~~~~~~~~~~~~~~~~ > > > arch/arm64/kernel/traps.c:704:26: note: (near initialization for 'esr_class_str[0]') > > > arch/arm64/kernel/traps.c:705:22: warning: initialized field overwritten [-Woverride-init] > > > 705 | [ESR_ELx_EC_WFx] = "WFI/WFE", > > > | ^~~~~~~~~ > > > > > > This is harmless since they are only informational strings, > > > but it's easy to change the code to ignore missing initialization > > > and instead warn about possible duplicate initializers. > > > > This has come up before, and IMO the warning is more hindrance than > > helpful, given the prevalance of spurious warnings, and the (again IMO) > > the rework needed to avoid those making the code harder to reason about > > FWIW in QEMU we turn the clang version of this off with > -Wno-initializer-overrides because we agree that the code is > fine and the compiler is being unhelpful in this case. (There's > a reason gcc doesn't put it in -Wall.) > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91688 is a request > for something that would catch bugs without breaking ranged-array > initializer syntax usage, but the gcc devs don't seem to have > responded. Yes, I'm inclined to agree. The code is fine, and "fixing" it just leads to churn and the possible introduction of bugs. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel