Apply Crypto API wrappers to the exported crypto symbol in CONFIG_ASYNC_RAID6_RECOV-related crypto to convert them into pluggable interface.
Signed-off-by: Jay Wang <[email protected]> --- crypto/async_tx/Makefile | 2 +- crypto/fips140/fips140-api.c | 11 +++++++++++ include/linux/async_tx.h | 16 +++++++--------- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/crypto/async_tx/Makefile b/crypto/async_tx/Makefile index 9b0277843bb3..2f700c2312af 100644 --- a/crypto/async_tx/Makefile +++ b/crypto/async_tx/Makefile @@ -3,5 +3,5 @@ crypto-objs-$(CONFIG_ASYNC_CORE) += async_tx.o crypto-objs-$(CONFIG_ASYNC_MEMCPY) += async_memcpy.o crypto-objs-$(CONFIG_ASYNC_XOR) += async_xor.o crypto-objs-$(CONFIG_ASYNC_PQ) += async_pq.o -obj-$(CONFIG_ASYNC_RAID6_RECOV) += async_raid6_recov.o +crypto-objs-$(CONFIG_ASYNC_RAID6_RECOV) += async_raid6_recov.o obj-$(CONFIG_ASYNC_RAID6_TEST) += raid6test.o diff --git a/crypto/fips140/fips140-api.c b/crypto/fips140/fips140-api.c index 6c22baf0ce10..7159c796d87f 100644 --- a/crypto/fips140/fips140-api.c +++ b/crypto/fips140/fips140-api.c @@ -842,6 +842,17 @@ DEFINE_CRYPTO_API_STUB(async_xor_val_offs); DEFINE_CRYPTO_API_STUB(async_gen_syndrome); DEFINE_CRYPTO_API_STUB(async_syndrome_val); +#endif +/* + * crypto/async_tx/async_raid6_recov.c + */ +#if IS_BUILTIN(CONFIG_ASYNC_RAID6_RECOV) + +#include <linux/async_tx.h> + +DEFINE_CRYPTO_API_STUB(async_raid6_2data_recov); +DEFINE_CRYPTO_API_STUB(async_raid6_datap_recov); + #endif /* * crypto/ecdh_helper.c diff --git a/include/linux/async_tx.h b/include/linux/async_tx.h index 9f733d01f69e..4e791a978ac3 100644 --- a/include/linux/async_tx.h +++ b/include/linux/async_tx.h @@ -189,15 +189,13 @@ DECLARE_CRYPTO_API(CONFIG_ASYNC_PQ, async_syndrome_val, struct dma_async_tx_desc (struct page **blocks, unsigned int *offsets, int src_cnt, size_t len, enum sum_check_flags *pqres, struct page *spare, unsigned int s_off, struct async_submit_ctl *submit), (blocks, offsets, src_cnt, len, pqres, spare, s_off, submit)); -struct dma_async_tx_descriptor * -async_raid6_2data_recov(int src_num, size_t bytes, int faila, int failb, - struct page **ptrs, unsigned int *offs, - struct async_submit_ctl *submit); - -struct dma_async_tx_descriptor * -async_raid6_datap_recov(int src_num, size_t bytes, int faila, - struct page **ptrs, unsigned int *offs, - struct async_submit_ctl *submit); +DECLARE_CRYPTO_API(CONFIG_ASYNC_RAID6_RECOV, async_raid6_2data_recov, struct dma_async_tx_descriptor *, + (int src_num, size_t bytes, int faila, int failb, struct page **ptrs, unsigned int *offs, struct async_submit_ctl *submit), + (src_num, bytes, faila, failb, ptrs, offs, submit)); + +DECLARE_CRYPTO_API(CONFIG_ASYNC_RAID6_RECOV, async_raid6_datap_recov, struct dma_async_tx_descriptor *, + (int src_num, size_t bytes, int faila, struct page **ptrs, unsigned int *offs, struct async_submit_ctl *submit), + (src_num, bytes, faila, ptrs, offs, submit)); DECLARE_CRYPTO_API(CONFIG_ASYNC_CORE, async_tx_quiesce, void, (struct dma_async_tx_descriptor **tx), -- 2.47.3
