If CONFIG_MODULES=y and CONFIG_CRYPTO_DEV_ASPEED=m,
build modpost would be failed.
Error messages:
ERROR: modpost: "aspeed_register_hace_hash_algs"
[drivers/crypto/aspeed/aspeed_crypto.ko] undefined!
ERROR: modpost: "aspeed_unregister_hace_hash_algs"
[drivers/crypto/aspeed/aspeed_crypto.ko] undefined!
Change build sequence to fix this.
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Neal Liu <[email protected]>
---
drivers/crypto/aspeed/Makefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/aspeed/Makefile b/drivers/crypto/aspeed/Makefile
index 421e2ca9c53e..4cc1a7ad3652 100644
--- a/drivers/crypto/aspeed/Makefile
+++ b/drivers/crypto/aspeed/Makefile
@@ -1,9 +1,9 @@
-obj-$(CONFIG_CRYPTO_DEV_ASPEED) += aspeed_crypto.o
-aspeed_crypto-objs := aspeed-hace.o \
- $(hace-hash-y) \
- $(hace-crypto-y)
-
obj-$(CONFIG_CRYPTO_DEV_ASPEED_HACE_HASH) += aspeed-hace-hash.o
hace-hash-$(CONFIG_CRYPTO_DEV_ASPEED_HACE_HASH) := aspeed-hace-hash.o
obj-$(CONFIG_CRYPTO_DEV_ASPEED_HACE_CRYPTO) += aspeed-hace-crypto.o
hace-crypto-$(CONFIG_CRYPTO_DEV_ASPEED_HACE_CRYPTO) := aspeed-hace-crypto.o
+
+obj-$(CONFIG_CRYPTO_DEV_ASPEED) += aspeed_crypto.o
+aspeed_crypto-objs := aspeed-hace.o \
+ $(hace-hash-y) \
+ $(hace-crypto-y)
--
2.25.1
On Mon, Aug 29, 2022 at 8:42 AM Neal Liu <[email protected]> wrote:
>
> If CONFIG_MODULES=y and CONFIG_CRYPTO_DEV_ASPEED=m,
> build modpost would be failed.
>
> Error messages:
> ERROR: modpost: "aspeed_register_hace_hash_algs"
> [drivers/crypto/aspeed/aspeed_crypto.ko] undefined!
> ERROR: modpost: "aspeed_unregister_hace_hash_algs"
> [drivers/crypto/aspeed/aspeed_crypto.ko] undefined!
>
> Change build sequence to fix this.
>
> Reported-by: kernel test robot <[email protected]>
> Signed-off-by: Neal Liu <[email protected]>
Tested-by: Sudip Mukherjee <[email protected]>
--
Regards
Sudip
On Mon, Aug 29, 2022 at 03:20:35PM +0800, Neal Liu wrote:
>
> obj-$(CONFIG_CRYPTO_DEV_ASPEED_HACE_HASH) += aspeed-hace-hash.o
> hace-hash-$(CONFIG_CRYPTO_DEV_ASPEED_HACE_HASH) := aspeed-hace-hash.o
> obj-$(CONFIG_CRYPTO_DEV_ASPEED_HACE_CRYPTO) += aspeed-hace-crypto.o
> hace-crypto-$(CONFIG_CRYPTO_DEV_ASPEED_HACE_CRYPTO) := aspeed-hace-crypto.o
Why are these two files being included twice? I think the obj-
lines should be deleted.
Thanks,
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
> -----Original Message-----
> From: Herbert Xu <[email protected]>
> Sent: Friday, September 2, 2022 6:29 PM
> To: Neal Liu <[email protected]>
> Cc: David S . Miller <[email protected]>; Joel Stanley <[email protected]>;
> Andrew Jeffery <[email protected]>; [email protected];
> [email protected]; [email protected];
> [email protected]; BMC-SW <[email protected]>; kernel
> test robot <[email protected]>
> Subject: Re: [PATCH] crypto: aspeed: fix build module error
>
> On Mon, Aug 29, 2022 at 03:20:35PM +0800, Neal Liu wrote:
> >
> > obj-$(CONFIG_CRYPTO_DEV_ASPEED_HACE_HASH) += aspeed-hace-hash.o
> > hace-hash-$(CONFIG_CRYPTO_DEV_ASPEED_HACE_HASH) :=
> aspeed-hace-hash.o
> > obj-$(CONFIG_CRYPTO_DEV_ASPEED_HACE_CRYPTO) +=
> aspeed-hace-crypto.o
> > hace-crypto-$(CONFIG_CRYPTO_DEV_ASPEED_HACE_CRYPTO) :=
> > aspeed-hace-crypto.o
>
> Why are these two files being included twice? I think the obj- lines should be
> deleted.
>
> Thanks,
I'll send new patch within removing the redundant obj- lines.
Thanks.
> --
> Email: Herbert Xu <[email protected]> Home Page:
> http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt