[PATCH v3 09/14] crypto/qat: use rte_pktmbuf_mtod_offset
Stephen Hemminger
stephen at networkplumber.org
Thu Jul 6 19:59:33 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 1bafeb4a53e8..3e0dfea94c87 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 193281cd9135..d7ceb13b29cd 100644
--- a/drivers/crypto/qat/qat_sym.h
+++ b/drivers/crypto/qat/qat_sym.h
@@ -192,13 +192,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