]> www.infradead.org Git - users/dwmw2/linux.git/commit
crypto: caam/qi - fix compilation with DEBUG enabled
authorHoria Geantă <horia.geanta@nxp.com>
Mon, 10 Jul 2017 05:40:28 +0000 (08:40 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Sep 2017 15:39:22 +0000 (17:39 +0200)
commit9808d1a5e20575b07620fcdbadc93ebedf1a593f
tree74ecb7d8b19650234d4f50ce97ac89707ad25f18
parent224aec7e1cb4f71dad248e4d6d5915643c663367
crypto: caam/qi - fix compilation with DEBUG enabled

commit 972b812bd1e17cb0a9112f565951795f886fcc94 upstream.

caam/qi driver does not compile when DEBUG is enabled
(CRYPTO_DEV_FSL_CAAM_DEBUG=y):

drivers/crypto/caam/caamalg_qi.c: In function 'ablkcipher_done':
drivers/crypto/caam/caamalg_qi.c:794:2: error: implicit declaration of function 'dbg_dump_sg' [-Werror=implicit-function-declaration]
  dbg_dump_sg(KERN_ERR, "dst    @" __stringify(__LINE__)": ",

Since dbg_dump_sg() is shared between caam/jr and caam/qi, move it
in a shared location and export it.

At the same time:
-reduce ifdeferry by providing a no-op implementation for !DEBUG case
-rename it to caam_dump_sg() to be consistent in terms of
exported symbols namespace (caam_*)

Fixes: b189817cf789 ("crypto: caam/qi - add ablkcipher and authenc algorithms")
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/caam/caamalg.c
drivers/crypto/caam/caamalg_qi.c
drivers/crypto/caam/error.c
drivers/crypto/caam/error.h