Re: [PATCH] x86_crypto: Fix build warnings about export.h

From: Herbert Xu
Date: Tue Jun 10 2025 - 22:58:31 EST


On Wed, Jun 11, 2025 at 10:51:31AM +0800, “ChengZhenghan” wrote:
> From: ChengZhenghan <chengzhenghan@xxxxxxxxxxxxx>
>
> I got some build warnings with W=1:
> arch/x86/coco/sev/core.c:
> arch/x86/crypto/aria_aesni_avx2_glue.c:
> warning: EXPORT_SYMBOL() is used,
> but #include <linux/export.h> is missing
> arch/x86/crypto/aria_aesni_avx_glue.c:
> warning: EXPORT_SYMBOL() is used,
> but #include <linux/export.h> is missing
> arch/x86/crypto/camellia_aesni_avx_glue.c:
> warning: EXPORT_SYMBOL() is used,
> but #include <linux/export.h> is missing
> arch/x86/crypto/camellia_glue.c: warning:
> EXPORT_SYMBOL() is used,
> but #include <linux/export.h> is missing
> arch/x86/crypto/curve25519-x86_64.c:
> warning: EXPORT_SYMBOL() is used,
> but #include <linux/export.h> is missing
> arch/x86/crypto/serpent_avx_glue.c:
> warning: EXPORT_SYMBOL() is used,
> but #include <linux/export.h> is missing
> arch/x86/crypto/sm4_aesni_avx_glue.c:
> warning: EXPORT_SYMBOL() is used,
> but #include <linux/export.h> is missing
> arch/x86/crypto/twofish_glue.c:
> warning: EXPORT_SYMBOL() is used,
> but #include <linux/export.h> is missing
> arch/x86/crypto/twofish_glue_3way.c:
> warning: EXPORT_SYMBOL() is used,
> but #include <linux/export.h> is missing
> so I fixed these build warnings for x86_64.
>
> Signed-off-by: ChengZhenghan <chengzhenghan@xxxxxxxxxxxxx>
> ---
> arch/x86/crypto/aria_aesni_avx2_glue.c | 1 +
> arch/x86/crypto/aria_aesni_avx_glue.c | 1 +
> arch/x86/crypto/camellia_aesni_avx_glue.c | 1 +
> arch/x86/crypto/camellia_glue.c | 1 +
> arch/x86/crypto/curve25519-x86_64.c | 1 +
> arch/x86/crypto/serpent_avx_glue.c | 1 +
> arch/x86/crypto/sm4_aesni_avx_glue.c | 1 +
> arch/x86/crypto/twofish_glue.c | 1 +
> arch/x86/crypto/twofish_glue_3way.c | 1 +
> 9 files changed, 9 insertions(+)

module.h always includes export.h so this is not needed at all.

Cheers,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt