crypto: aesni - fix crypto_fpu_exit() section mismatch
authorJeremiah Mahler <jmmahler@gmail.com>
Sat, 13 Jun 2015 04:56:40 +0000 (21:56 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 15 Jun 2015 10:15:58 +0000 (18:15 +0800)
The '__init aesni_init()' function calls the '__exit crypto_fpu_exit()'
function directly.  Since they are in different sections, this generates
a warning.

  make CONFIG_DEBUG_SECTION_MISMATCH=y
  ...
  WARNING: arch/x86/crypto/aesni-intel.o(.init.text+0x12b): Section
  mismatch in reference from the function init_module() to the function
  .exit.text:crypto_fpu_exit()
  The function __init init_module() references
  a function __exit crypto_fpu_exit().
  This is often seen when error handling in the init function
  uses functionality in the exit path.
  The fix is often to remove the __exit annotation of
  crypto_fpu_exit() so it may be used outside an exit section.

Fix the warning by removing the __exit annotation.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/fpu.c

index f368ba261739fa09be28bc02fe34cf3112099fa8..321e97979662a1a6acb1588a3467b023a100779b 100644 (file)
@@ -156,7 +156,7 @@ int __init crypto_fpu_init(void)
        return crypto_register_template(&crypto_fpu_tmpl);
 }
 
-void __exit crypto_fpu_exit(void)
+void crypto_fpu_exit(void)
 {
        crypto_unregister_template(&crypto_fpu_tmpl);
 }
This page took 0.044401 seconds and 5 git commands to generate.