From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754777AbbDIAdo (ORCPT ); Wed, 8 Apr 2015 20:33:44 -0400 Received: from smtprelay0020.hostedemail.com ([216.40.44.20]:42016 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753681AbbDIAdn (ORCPT ); Wed, 8 Apr 2015 20:33:43 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:355:379:541:599:960:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1538:1593:1594:1711:1714:1730:1747:1777:1792:2393:2553:2559:2562:2691:2693:2828:3138:3139:3140:3141:3142:3351:3622:3867:3872:3874:4250:4321:5007:6119:6261:7903:10004:10400:10848:11232:11658:11914:12517:12519:12740:13069:13311:13357:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: joke67_5a628f1ba363b X-Filterd-Recvd-Size: 1685 Message-ID: <1428539619.22406.68.camel@perches.com> Subject: Re: [PATCH] checkpatch: Add a test for const with __read_mostly uses From: Joe Perches To: Andi Kleen Cc: Andrew Morton , Andy Whitcroft , linux-kernel@vger.kernel.org Date: Wed, 08 Apr 2015 17:33:39 -0700 In-Reply-To: <20150409002851.GV2366@two.firstfloor.org> References: <1428498405-7019-1-git-send-email-andi@firstfloor.org> <1428498405-7019-2-git-send-email-andi@firstfloor.org> <20150408153554.65c87de78f1c2289483f67e8@linux-foundation.org> <20150408235239.GU2366@two.firstfloor.org> <1428538489.22406.65.camel@perches.com> <20150409002851.GV2366@two.firstfloor.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2015-04-09 at 02:28 +0200, Andi Kleen wrote: > On Wed, Apr 08, 2015 at 05:14:49PM -0700, Joe Perches wrote: > > const objects shouldn't be __read_mostly. They are read-only. > > > > Marking these objects as __read_mostly causes section conflicts > > with LTO linking. > > > > So add a test to try to avoid this issue. > > I suspect excluding * > will miss quite a few cases, but there's no way around it. That excludes only "const *" not "const foo * const" so I believe it shouldn't exclude anything that's not pointer to const.