Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757730AbcCaTVl (ORCPT ); Thu, 31 Mar 2016 15:21:41 -0400 Received: from smtprelay0177.hostedemail.com ([216.40.44.177]:56088 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757500AbcCaTVk (ORCPT ); Thu, 31 Mar 2016 15:21:40 -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:3352:3622:3653:3865:3866:3867:3868:3872:3874:4321:5007:10004:10400:10848:11026:11232:11658:11783:11914:12043:12048:12295:12296:12438:12517:12519:12740:13069:13311:13357:13439:13894:14659:14721:21080:30012:30054: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:1,LUA_SUMMARY:none X-HE-Tag: mice54_e3681a01fb3d X-Filterd-Recvd-Size: 2029 Message-ID: <1459452096.1744.12.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: Thu, 31 Mar 2016 12:21:36 -0700 In-Reply-To: <56FD3BAE.1070209@cisco.com> References: <56FD3BAE.1070209@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: 1134 Lines: 32 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.