]> git.baikalelectronics.ru Git - kernel.git/commit
modpost: check for static EXPORT_SYMBOL* functions
authorDenis Efremov <efremov@linux.com>
Thu, 1 Aug 2019 06:06:57 +0000 (09:06 +0300)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 13 Aug 2019 16:10:18 +0000 (01:10 +0900)
commit39b5ba1bc8a0a2b158a48dbabccd7afe5bf022e5
tree202a96f42677731f49a85b5c06c9308c3b5af8f6
parenta2e8c383b17a2d6e840c741e443bf5c89e5e0a84
modpost: check for static EXPORT_SYMBOL* functions

This patch adds a check to warn about static EXPORT_SYMBOL* functions
during the modpost. In most of the cases, a static symbol marked for
exporting is an odd combination that should be fixed either by deleting
the exporting mark or by removing the static attribute and adding the
appropriate declaration to headers.

This check could help to detect the following problems:
1. 91d0288f0aab ("i2c: add newly exported functions to the header, too")
2. 0005dc9fbf1c ("net: phy: make exported variables non-static")
3. f14c96b6c2c7 ("mm: remove the exporting of totalram_pages")
4. 77908dc0f7e4 ("s390/zcrypt: remove the exporting of ap_query_configuration")
5. a184b87f5bc1 ("sunrpc/cache: remove the exporting of cache_seq_next")
6. d3873e4677df ("crypto: skcipher - remove the exporting of skcipher_walk_next")
7. a9b4de8f598d ("gve: Remove the exporting of gve_probe")
8. 918bf72fed13 ("scsi: libsas: remove the exporting of sas_wait_eh")
9. ...

The build time impact is very limited and is almost at the unnoticeable
level (< 1 sec).

Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
scripts/mod/modpost.c