Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755230AbcDKVvj (ORCPT ); Mon, 11 Apr 2016 17:51:39 -0400 Received: from rcdn-iport-7.cisco.com ([173.37.86.78]:5966 "EHLO rcdn-iport-7.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750925AbcDKVvi (ORCPT ); Mon, 11 Apr 2016 17:51:38 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AJBQCjGwxX/4ENJK1cgze8P4Fyhg0Cg?= =?us-ascii?q?S46EgEBAQEBAQFlJ4RCAQEEOEARCxgJFg8JAwIBAgFFBgEMCAEBiCO/eAEBAQE?= =?us-ascii?q?BAQEBAQEBAQEBAQEBARgLhhaES4oVAQSOQolCjgyJOYVURY5hJgE7ggQZgWqKU?= =?us-ascii?q?QEBAQ?= X-IronPort-AV: E=Sophos;i="5.24,470,1454976000"; d="scan'208";a="90653927" Subject: Re: checkpatch false positon on EXPORT_SYMBOL To: Joe Perches , Andy Whitcroft , open list , Daniel Walker , "xe-kernel@external.cisco.com" References: <56FD3BAE.1070209@cisco.com> <1459452096.1744.12.camel@perches.com> From: Daniel Walker Message-ID: <570C1C62.1060008@cisco.com> Date: Mon, 11 Apr 2016 14:51:30 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1459452096.1744.12.camel@perches.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Auto-Response-Suppress: DR, OOF, AutoReply Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1282 Lines: 38 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. Daniel