Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754755AbcDYOMZ (ORCPT ); Mon, 25 Apr 2016 10:12:25 -0400 Received: from mail-qg0-f49.google.com ([209.85.192.49]:34595 "EHLO mail-qg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752520AbcDYOMW (ORCPT ); Mon, 25 Apr 2016 10:12:22 -0400 Date: Mon, 25 Apr 2016 10:12:16 -0400 (EDT) From: Nicolas Pitre To: Eric Engestrom cc: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, Alexandre Belloni , Krzysztof Kozlowski , Tony Lindgren , Linus Walleij , Nicolas Ferre , Lee Jones , Roland Stigge , Florian Fainelli , Russell King , Alexander Shiyan , Kevin Hilman , Viresh Kumar , bcm-kernel-feedback-list@broadcom.com, Jean-Christophe Plagniol-Villard , spear-devel@list.st.com, Ray Jui , Rajendra Nayak , Sekhar Nori , Krzysztof Halasa , Gregory Fong , linux-omap@vger.kernel.org, Paul Walmsley , Scott Branden , Shiraz Hashim , linux-kernel@vger.kernel.org, Sascha Hauer , Shawn Guo Subject: Re: [PATCH 4/4] ARM: remove duplicate const qualifier In-Reply-To: <20160425125809.GP32731@imgtec.com> Message-ID: References: <1461577678-29517-1-git-send-email-eric.engestrom@imgtec.com> <20160425095715.GA2366@piout.net> <20160425103911.GO32731@imgtec.com> <4641918.pNBP5iAK01@wuerfel> <20160425125809.GP32731@imgtec.com> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1093 Lines: 28 On Mon, 25 Apr 2016, Eric Engestrom wrote: > On Mon, Apr 25, 2016 at 01:38:18PM +0200, Arnd Bergmann wrote: > > Maybe say you you found it (llvm, sparse, coccinelle?), and why this > > is causing a problem for anyone. If it's just unnecessary but not > > harmful, I'd probably ignore the patch. > > $ grep -rE '(^|\W)const(\s+\w+)+\s+const\s' > > I just happened to notice some unnecessary const in our internal code, > so I grep'ed for it in a couple big OSS projects to see how common it > was. Since I found only a few, I decided to remove them, but like I said > it just gets ignored by all the compilers I know, so there's absolutely > no harm in leaving this dead code around. Beware. I added many of those exactly because gcc did not ignore them when compiling with LTO where the lack of a const qualifier to qualify the actual array content, and not only the reference to that content, generated build errors due to section mismatches from the __initconst annotation. So this is a NAK from me unless you may confirm that LTO builds are unaffected by your changes. Nicolas