Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1368379

checkpatch false positon on EXPORT_SYMBOL

From Daniel Walker <danielwa@cisco.com>
Newsgroups linux.kernel
Subject checkpatch false positon on EXPORT_SYMBOL
Date 2016-03-31 17:10 +0200
Message-ID <riMoq-6WJ-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

checkpatch false positon on EXPORT_SYMBOL Daniel Walker <danielwa@cisco.com> - 2016-03-31 17:10 +0200
  Re: checkpatch false positon on EXPORT_SYMBOL Joe Perches <joe@perches.com> - 2016-03-31 21:30 +0200

csiph-web