* [PATCH] crypto: caam/qi2 - avoid double export
@ 2018-10-02 20:56 Arnd Bergmann
2018-10-03 7:24 ` Horia Geanta
2018-10-08 5:53 ` Herbert Xu
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2018-10-02 20:56 UTC (permalink / raw)
To: Horia Geantă, Aymen Sghaier, Herbert Xu, David S. Miller
Cc: Arnd Bergmann, linux-crypto, linux-kernel
Both the caam ctrl file and dpaa2_caam export a couple of flags. They
use an #ifdef check to make sure that each flag is only built once,
but this fails if they are both loadable modules:
WARNING: drivers/crypto/caam/dpaa2_caam: 'caam_little_end' exported twice. Previous export was in drivers/crypto/caam/caam.ko
WARNING: drivers/crypto/caam/dpaa2_caam: 'caam_imx' exported twice. Previous export was in drivers/crypto/caam/caam.ko
Change the #ifdef to an IS_ENABLED() check in order to make it work in
all configurations. It may be better to redesign this aspect of the
two drivers in a cleaner way.
Fixes: 8d818c105501 ("crypto: caam/qi2 - add DPAA2-CAAM driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/crypto/caam/caamalg_qi2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c
index 2f569d0231f9..7d8ac0222fa3 100644
--- a/drivers/crypto/caam/caamalg_qi2.c
+++ b/drivers/crypto/caam/caamalg_qi2.c
@@ -25,7 +25,7 @@
#define CAAM_MAX_KEY_SIZE (AES_MAX_KEY_SIZE + CTR_RFC3686_NONCE_SIZE + \
SHA512_DIGEST_SIZE * 2)
-#ifndef CONFIG_CRYPTO_DEV_FSL_CAAM
+#if !IS_ENABLED(CONFIG_CRYPTO_DEV_FSL_CAAM)
bool caam_little_end;
EXPORT_SYMBOL(caam_little_end);
bool caam_imx;
--
2.18.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: caam/qi2 - avoid double export
2018-10-02 20:56 [PATCH] crypto: caam/qi2 - avoid double export Arnd Bergmann
@ 2018-10-03 7:24 ` Horia Geanta
2018-10-08 5:53 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Horia Geanta @ 2018-10-03 7:24 UTC (permalink / raw)
To: Arnd Bergmann, Aymen Sghaier, Herbert Xu, David S. Miller
Cc: linux-crypto, linux-kernel
On 10/2/2018 11:57 PM, Arnd Bergmann wrote:
> Both the caam ctrl file and dpaa2_caam export a couple of flags. They
> use an #ifdef check to make sure that each flag is only built once,
> but this fails if they are both loadable modules:
>
> WARNING: drivers/crypto/caam/dpaa2_caam: 'caam_little_end' exported twice. Previous export was in drivers/crypto/caam/caam.ko
> WARNING: drivers/crypto/caam/dpaa2_caam: 'caam_imx' exported twice. Previous export was in drivers/crypto/caam/caam.ko
>
> Change the #ifdef to an IS_ENABLED() check in order to make it work in
> all configurations. It may be better to redesign this aspect of the
> two drivers in a cleaner way.
>
I think this fix is ok for the moment.
Indeed, work is on-going to change the design a bit.
> Fixes: 8d818c105501 ("crypto: caam/qi2 - add DPAA2-CAAM driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Horia Geantă <horia.geanta@nxp.com>
Thanks,
Horia
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: caam/qi2 - avoid double export
2018-10-02 20:56 [PATCH] crypto: caam/qi2 - avoid double export Arnd Bergmann
2018-10-03 7:24 ` Horia Geanta
@ 2018-10-08 5:53 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2018-10-08 5:53 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Horia Geantă,
Aymen Sghaier, David S. Miller, linux-crypto, linux-kernel
On Tue, Oct 02, 2018 at 10:56:19PM +0200, Arnd Bergmann wrote:
> Both the caam ctrl file and dpaa2_caam export a couple of flags. They
> use an #ifdef check to make sure that each flag is only built once,
> but this fails if they are both loadable modules:
>
> WARNING: drivers/crypto/caam/dpaa2_caam: 'caam_little_end' exported twice. Previous export was in drivers/crypto/caam/caam.ko
> WARNING: drivers/crypto/caam/dpaa2_caam: 'caam_imx' exported twice. Previous export was in drivers/crypto/caam/caam.ko
>
> Change the #ifdef to an IS_ENABLED() check in order to make it work in
> all configurations. It may be better to redesign this aspect of the
> two drivers in a cleaner way.
>
> Fixes: 8d818c105501 ("crypto: caam/qi2 - add DPAA2-CAAM driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/crypto/caam/caamalg_qi2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-08 5:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-02 20:56 [PATCH] crypto: caam/qi2 - avoid double export Arnd Bergmann
2018-10-03 7:24 ` Horia Geanta
2018-10-08 5:53 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).