Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754068AbcDKWKE (ORCPT ); Mon, 11 Apr 2016 18:10:04 -0400 Received: from smtprelay0061.hostedemail.com ([216.40.44.61]:40922 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752311AbcDKWKC (ORCPT ); Mon, 11 Apr 2016 18:10:02 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:334:355:368:369:379:541:599:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1381:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3353:3622:3653:3865:3866:3867:3868:3870:3872:3874:4321:5007:7903:10004:10400:10848:11026:11232:11658:11783:11914:12043:12048:12295:12296:12438:12517:12519:12740:13019:13069:13161:13229:13311:13357:13439:13894:14096:14097:14659:14721:21080:30012:30054:30056:30064:30089:30091,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,LFtime:2,LUA_SUMMARY:none X-HE-Tag: side62_54fbc2275374e X-Filterd-Recvd-Size: 2545 Message-ID: <1460412582.1800.96.camel@perches.com> Subject: Re: checkpatch false positon on EXPORT_SYMBOL From: Joe Perches To: Daniel Walker , Andy Whitcroft , open list , Daniel Walker , "xe-kernel@external.cisco.com" Date: Mon, 11 Apr 2016 15:09:42 -0700 In-Reply-To: <570C1C62.1060008@cisco.com> References: <56FD3BAE.1070209@cisco.com> <1459452096.1744.12.camel@perches.com> <570C1C62.1060008@cisco.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.2-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1601 Lines: 47 On Mon, 2016-04-11 at 14:51 -0700, Daniel Walker wrote: > On 03/31/2016 12:21 PM, Joe Perches wrote: > > > > On Thu, 2016-03-31 at 08:01 -0700, Daniel Walker wrote: > > > > > > The below looks like normal code but the last export symbol gets the > > > warning, > > > > > > > > > WARNING:EXPORT_SYMBOL: EXPORT_SYMBOL(foo); should immediately follw its > > > function/variable > > > #16: FILE: kernel/acct.c:70: > > > +EXPORT_SYMBOL(test_export);????/* Error ! */ > > > > > > It seems to have to do with the comments at the end of the line. The > > > first two examples don't have warnings because I removed the comments on > > > different lines. comments on the variable and export symbol lines gets > > > the error tho. > > That looks like a false positive I'll leave for Andy. > > > > $ cat ~/export_symbol.c > > int test_export_no_comment; > > EXPORT_SYMBOL(test_export_no_comment); > > int test_export_comment_int; /* comment int */ > > EXPORT_SYMBOL(test_export_int); > > int test_export_comment_symbol; > > EXPORT_SYMBOL(test_export_symbol); /* comment symbol */ > > int test_export_both; /* comment both 1 */ > > EXPORT_SYMBOL(test_export_both); /* comment both 2 */ > > $ > > > > Something's a bit off with the $stat variable: > > > > test_export_int doesn't match the EXPORT_SYMBOL test. > > test_export_symbol and test_export_both get warnings. > > > > Did this get solved? I haven't see anything else on it. Not by me. I punted to Andy and I haven't heard from him. There aren't many cases of this defect in the current kernel tree, so I don't know how much he might care.