• Denis Efremov's avatar
    modpost: check for static EXPORT_SYMBOL* functions · 15bfc234
    Denis Efremov authored
    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. 550113d4 ("i2c: add newly exported functions to the header, too")
    2. 54638c6e ("net: phy: make exported variables non-static")
    3. 98ef2046 ("mm: remove the exporting of totalram_pages")
    4. 73df167c ("s390/zcrypt: remove the exporting of ap_query_configuration")
    5. a57caf8c ("sunrpc/cache: remove the exporting of cache_seq_next")
    6. e4e47306 ("crypto: skcipher - remove the exporting of skcipher_walk_next")
    7. 14b4c48b ("gve: Remove the exporting of gve_probe")
    8. 9b79ee97 ("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: default avatarEmil Velikov <emil.l.velikov@gmail.com>
    Signed-off-by: default avatarDenis Efremov <efremov@linux.com>
    Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
    15bfc234
modpost.c 66.4 KB