[PATCH v2 09/14] crypto/qat: use rte_pktmbuf_mtod_offset
Stephen Hemminger
stephen at networkplumber.org
Sat May 6 18:03:58 CEST 2023
Auto generated with cocci/mtod-offset.cocci
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
drivers/crypto/qat/dev/qat_crypto_pmd_gens.h | 9 +++++----
drivers/crypto/qat/qat_sym.h | 9 +++++----
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
index 524c291340da..11f468a9fdc0 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
@@ -56,14 +56,15 @@ qat_bpicipher_preprocess(struct qat_sym_session *ctx,
uint8_t *last_block, *dst, *iv;
uint32_t last_block_offset = sym_op->cipher.data.offset +
sym_op->cipher.data.length - last_block_len;
- last_block = (uint8_t *) rte_pktmbuf_mtod_offset(sym_op->m_src,
- uint8_t *, last_block_offset);
+ last_block = rte_pktmbuf_mtod_offset(sym_op->m_src, uint8_t *,
+ last_block_offset);
if (unlikely((sym_op->m_dst != NULL)
&& (sym_op->m_dst != sym_op->m_src)))
/* out-of-place operation (OOP) */
- dst = (uint8_t *) rte_pktmbuf_mtod_offset(sym_op->m_dst,
- uint8_t *, last_block_offset);
+ dst = rte_pktmbuf_mtod_offset(sym_op->m_dst,
+ uint8_t *,
+ last_block_offset);
else
dst = last_block;
diff --git a/drivers/crypto/qat/qat_sym.h b/drivers/crypto/qat/qat_sym.h
index 9a4251e08b47..615e92f01803 100644
--- a/drivers/crypto/qat/qat_sym.h
+++ b/drivers/crypto/qat/qat_sym.h
@@ -181,13 +181,14 @@ qat_bpicipher_postprocess(struct qat_sym_session *ctx,
last_block_offset = sym_op->cipher.data.offset +
sym_op->cipher.data.length - last_block_len;
- last_block = (uint8_t *) rte_pktmbuf_mtod_offset(sym_op->m_src,
- uint8_t *, last_block_offset);
+ last_block = rte_pktmbuf_mtod_offset(sym_op->m_src, uint8_t *,
+ last_block_offset);
if (unlikely(sym_op->m_dst != NULL))
/* out-of-place operation (OOP) */
- dst = (uint8_t *) rte_pktmbuf_mtod_offset(sym_op->m_dst,
- uint8_t *, last_block_offset);
+ dst = rte_pktmbuf_mtod_offset(sym_op->m_dst,
+ uint8_t *,
+ last_block_offset);
else
dst = last_block;
--
2.39.2
More information about the dev
mailing list