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 262C9C4363A for ; Mon, 26 Oct 2020 20:46:23 +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 9901B2080A for ; Mon, 26 Oct 2020 20:46:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UC3cFaRh"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="OYpJHC5z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9901B2080A 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=oPLYmiCDL2guu5P0hkxt9TxnaNLaLWg+ZNRSJ/86d5k=; b=UC3cFaRhtSsyEF/eCXiX8kM9Y Gpd6nJWDnexC6hxHxOboic0A8z2yh7YZ6b79y9f7mHjBNl8qzFycZdM2JjsqVinlBbst5PvEh07Xt fb47sO2xpO8klZRTBgITTOnWPBrfLxsOFjeCnAcNk6iRA34T8EEJ6G8AP7mV+lc6Jxc19TUc80Lwd 8yjgk90Qq1uT3dIZCsFYcO92rBByleT6HHZrZ3fQkUS5xeGpnXcpwYwc2PHenmRHdyzSi3UjS3XlG hJ4jPjYgVxa8VXrdqGao+o4yehi0/81Kv9QYWmc6Eypbprtq9cT4CLwU7gO6njkU+8JkoxTmnA0zW KewYtMXTw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX9Mc-00041h-0j; Mon, 26 Oct 2020 20:45:10 +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 1kX9Ma-00041H-1q for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 20:45:09 +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 C57EC20829; Mon, 26 Oct 2020 20:45:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603745107; bh=ugBiVaKqspUfWGmGcvkuQwYssioR+IihZhv5E+N4d3I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OYpJHC5zIEA4bB+RrTLSTBl5KdjezE3KVcjrlFbYx/opKsyxPfxmBgHG/89PDB9+S QxSK1YrmG3Lx4cJhVfAkYfSRgtEJRAZovAOvcYKHHnlO7WKvl2FgqXwq4QR2Xe3v8H ixacOj+xWSyyxeTrlYuw1EYCydKNK8fnhSYnU1uM= Date: Mon, 26 Oct 2020 20:45:01 +0000 From: Will Deacon To: Arnd Bergmann Subject: Re: [PATCH 4/4] arm64: traps: fix -Woverride-init warnings Message-ID: <20201026204500.GA25348@willie-the-truck> References: <20201026160342.3705327-1-arnd@kernel.org> <20201026160342.3705327-4-arnd@kernel.org> <20201026162314.GA42396@C02TD0UTHF1T.local> <20201026172737.GA25131@willie-the-truck> 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_164508_316831_72F20FFF X-CRM114-Status: GOOD ( 27.78 ) 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 , Peter Maydell , Gavin Shan , 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 08:28:45PM +0100, Arnd Bergmann wrote: > On Mon, Oct 26, 2020 at 6:27 PM Will Deacon wrote: > > 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. > > Ok, shall we just disable it for all of arch/arm64/kernel then? > The other parts of the kernel that follow the same line of thinking > are drivers/gpu/drm/amd/ and drivers/ata, for which I already > just turn them off. The rest of the kernel is mostly clean for > the warning, or there are actual bugs that it finds. I'm happy to take a patch disabling it, either for arch/arm64/kernel or arch/arm64 as a whole. Thanks! Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel