From: Daniel Walker <danielwa@cisco.com>
To: Andy Whitcroft <apw@canonical.com>,
open list <linux-kernel@vger.kernel.org>,
Joe Perches <joe@perches.com>, Daniel Walker <dwalker@fifo99.com>,
"xe-kernel@external.cisco.com" <xe-kernel@external.cisco.com>
Subject: checkpatch false positon on EXPORT_SYMBOL
Date: Thu, 31 Mar 2016 08:01:02 -0700 [thread overview]
Message-ID: <56FD3BAE.1070209@cisco.com> (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
next reply other threads:[~2016-03-31 15:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-31 15:01 Daniel Walker [this message]
2016-03-31 19:21 ` checkpatch false positon on EXPORT_SYMBOL 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56FD3BAE.1070209@cisco.com \
--to=danielwa@cisco.com \
--cc=apw@canonical.com \
--cc=dwalker@fifo99.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xe-kernel@external.cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).