public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* checkpatch false positon on EXPORT_SYMBOL
@ 2016-03-31 15:01 Daniel Walker
  2016-03-31 19:21 ` Joe Perches
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Walker @ 2016-03-31 15:01 UTC (permalink / raw)
  To: Andy Whitcroft, open list, Joe Perches, Daniel Walker,
	xe-kernel@external.cisco.com


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.

(warning may not be a proper patch)

diff --git a/kernel/acct.c b/kernel/acct.c
index 8d6e145..a0cc002 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -60,6 +60,15 @@
  #include <linux/blkdev.h> /* sector_div */
  #include <linux/pid_namespace.h>

+int test_export;
+EXPORT_SYMBOL(test_export);    /* No Error ! */
+
+int test_export;    /* No Error below */
+EXPORT_SYMBOL(test_export);
+
+int test_export;    /* Error below */
+EXPORT_SYMBOL(test_export);    /* Error ! */
+
  /*
   * These constants control the amount of freespace that suspend and
   * resume the process accounting system, and the time delay between

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-04-13  6:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-31 15:01 checkpatch false positon on EXPORT_SYMBOL Daniel Walker
2016-03-31 19:21 ` Joe Perches
2016-04-11 21:51   ` Daniel Walker
2016-04-11 22:09     ` Joe Perches
2016-04-12 12:59       ` Andy Whitcroft
2016-04-12 13:37         ` Daniel Walker
2016-04-12 17:49         ` Joe Perches
2016-04-12 18:02           ` Daniel Walker
2016-04-13  6:53           ` Andy Whitcroft

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox