Linux kbuild/kconfig development
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Masahiro Yamada <yamada.masahiro@socionext.com>,
	Michal Marek <michal.lkml@markovi.net>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Emil Velikov <emil.l.velikov@gmail.com>,
	Denis Efremov <efremov@linux.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Sam Ravnborg <sam@ravnborg.org>, WANG Chao <chao.wang@ucloud.cn>,
	Sami Tolvanen <samitolvanen@google.com>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mostpost: don't warn about symbols from another file
Date: Fri,  6 Sep 2019 17:10:48 +0200	[thread overview]
Message-ID: <20190906151059.1077708-1-arnd@arndb.de> (raw)

On architectures such as ARM that have a list of symbols exported from
assembler in a separate C file, we get a lot of new warnings:

WARNING: "__ashrdi3" [vmlinux] is a static (unknown)
WARNING: "__lshrdi3" [vmlinux] is a static (unknown)
WARNING: "__aeabi_llsr" [vmlinux] is a static (unknown)
WARNING: "__aeabi_lasr" [vmlinux] is a static (unknown)
WARNING: "__aeabi_uidivmod" [vmlinux] is a static (unknown)
WARNING: "__udivsi3" [vmlinux] is a static (unknown)
WARNING: "_change_bit" [vmlinux] is a static (unknown)
WARNING: "__aeabi_idiv" [vmlinux] is a static (unknown)
WARNING: "__umodsi3" [vmlinux] is a static (unknown)
WARNING: "__aeabi_uidiv" [vmlinux] is a static (unknown)
WARNING: "__aeabi_idivmod" [vmlinux] is a static (unknown)
WARNING: "__muldi3" [vmlinux] is a static (unknown)
WARNING: "__aeabi_ulcmp" [vmlinux] is a static (unknown)
WARNING: "__raw_writesb" [vmlinux] is a static (unknown)
WARNING: "__raw_readsb" [vmlinux] is a static (unknown)
...

This is not helpful, as these are clearly not static symbols
at all. Suppress the warning in a case like this.

Fixes: 15bfc2348d54 ("modpost: check for static EXPORT_SYMBOL* functions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 scripts/mod/modpost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 76c221dd9b2b..4265dd924933 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -2543,7 +2543,7 @@ int main(int argc, char **argv)
 		struct symbol *s = symbolhash[n];
 
 		while (s) {
-			if (s->is_static)
+			if (s->is_static && s->export != export_unknown)
 				warn("\"%s\" [%s] is a static %s\n",
 				     s->name, s->module->name,
 				     export_str(s->export));
-- 
2.20.0

             reply	other threads:[~2019-09-06 15:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06 15:10 Arnd Bergmann [this message]
2019-09-06 22:39 ` [PATCH] mostpost: don't warn about symbols from another file Denis Efremov
2019-09-07  5:28   ` Denis Efremov
2019-09-07 13:06     ` Arnd Bergmann
2019-09-07 21:08 ` Denis Efremov
2019-09-09 10:58 ` Masahiro Yamada

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=20190906151059.1077708-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=chao.wang@ucloud.cn \
    --cc=efremov@linux.com \
    --cc=emil.l.velikov@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=paul.walmsley@sifive.com \
    --cc=sam@ravnborg.org \
    --cc=samitolvanen@google.com \
    --cc=yamada.masahiro@socionext.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