diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index b55258689b49..9c96fd21a48d 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -631,15 +631,15 @@ hw_poll_job_ring(struct sec_job_ring_t *job_ring,
 
 			if (ctx->op->sym->m_dst) {
 				/*TODO check for ip header or other*/
-				ip4_hdr = (struct ip *)
-				rte_pktmbuf_mtod(ctx->op->sym->m_dst, char*);
+				ip4_hdr = rte_pktmbuf_mtod(ctx->op->sym->m_dst,
+							   struct ip *);
 				ctx->op->sym->m_dst->pkt_len =
 					rte_be_to_cpu_16(ip4_hdr->ip_len);
 				ctx->op->sym->m_dst->data_len =
 					rte_be_to_cpu_16(ip4_hdr->ip_len);
 			} else {
-				ip4_hdr = (struct ip *)
-				rte_pktmbuf_mtod(ctx->op->sym->m_src, char*);
+				ip4_hdr = rte_pktmbuf_mtod(ctx->op->sym->m_src,
+							   struct ip *);
 				ctx->op->sym->m_src->pkt_len =
 					rte_be_to_cpu_16(ip4_hdr->ip_len);
 				ctx->op->sym->m_src->data_len =
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
index 34d40b07d4c6..8b91d11b79cc 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
@@ -520,7 +520,7 @@ cn9k_cpt_sec_post_process(struct rte_crypto_op *cop,
 
 	if (infl_req->op_flags & CPT_OP_FLAGS_IPSEC_DIR_INBOUND) {
 
-		hdr = (struct roc_ie_on_inb_hdr *)rte_pktmbuf_mtod(m, char *);
+		hdr = rte_pktmbuf_mtod(m, struct roc_ie_on_inb_hdr *);
 
 		if (likely(m->next == NULL)) {
 			ip = PLT_PTR_ADD(hdr, ROC_IE_ON_INB_RPTR_HDR);
diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h
index 75c1dce231bf..1392af5833d1 100644
--- a/drivers/crypto/cnxk/cnxk_se.h
+++ b/drivers/crypto/cnxk/cnxk_se.h
@@ -2724,7 +2724,7 @@ fill_fc_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,
 		m = cpt_m_dst_get(cpt_op, m_src, m_dst);
 
 		/* Digest immediately following data is best case */
-		if (unlikely(rte_pktmbuf_mtod(m, uint8_t *) + mc_hash_off !=
+		if (unlikely(rte_pktmbuf_mtod_offset(m, uint8_t *, mc_hash_off) !=
 			     (uint8_t *)sym_op->aead.digest.data)) {
 			flags |= ROC_SE_VALID_MAC_BUF;
 			fc_params.mac_buf.size = sess->mac_len;
@@ -2759,8 +2759,7 @@ fill_fc_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,
 
 			/* hmac immediately following data is best case */
 			if (!(op_minor & ROC_SE_FC_MINOR_OP_HMAC_FIRST) &&
-			    (unlikely(rte_pktmbuf_mtod(m, uint8_t *) +
-					      mc_hash_off !=
+			    (unlikely(rte_pktmbuf_mtod_offset(m, uint8_t *, mc_hash_off) !=
 				      (uint8_t *)sym_op->auth.digest.data))) {
 				flags |= ROC_SE_VALID_MAC_BUF;
 				fc_params.mac_buf.size = sess->mac_len;
diff --git a/drivers/crypto/ipsec_mb/pmd_kasumi.c b/drivers/crypto/ipsec_mb/pmd_kasumi.c
index 5db9c523cd9a..70536ec3dc2a 100644
--- a/drivers/crypto/ipsec_mb/pmd_kasumi.c
+++ b/drivers/crypto/ipsec_mb/pmd_kasumi.c
@@ -83,13 +83,16 @@ process_kasumi_cipher_op(struct ipsec_mb_qp *qp, struct rte_crypto_op **ops,
 	uint32_t num_bytes[num_ops];
 
 	for (i = 0; i < num_ops; i++) {
-		src[i] = rte_pktmbuf_mtod(ops[i]->sym->m_src, uint8_t *)
-			 + (ops[i]->sym->cipher.data.offset >> 3);
+		src[i] = rte_pktmbuf_mtod_offset(ops[i]->sym->m_src,
+						 uint8_t *,
+						 (ops[i]->sym->cipher.data.offset >> 3));
 		dst[i] = ops[i]->sym->m_dst
-			     ? rte_pktmbuf_mtod(ops[i]->sym->m_dst, uint8_t *)
-				   + (ops[i]->sym->cipher.data.offset >> 3)
-			     : rte_pktmbuf_mtod(ops[i]->sym->m_src, uint8_t *)
-				   + (ops[i]->sym->cipher.data.offset >> 3);
+			     ? rte_pktmbuf_mtod_offset(ops[i]->sym->m_dst,
+						       uint8_t *,
+						       (ops[i]->sym->cipher.data.offset >> 3))
+			     : rte_pktmbuf_mtod_offset(ops[i]->sym->m_src,
+						       uint8_t *,
+						       (ops[i]->sym->cipher.data.offset >> 3));
 		iv_ptr = rte_crypto_op_ctod_offset(ops[i], uint8_t *,
 						    session->cipher_iv_offset);
 		iv[i] = *((uint64_t *)(iv_ptr));
@@ -155,8 +158,8 @@ process_kasumi_hash_op(struct ipsec_mb_qp *qp, struct rte_crypto_op **ops,
 
 		length_in_bits = ops[i]->sym->auth.data.length;
 
-		src = rte_pktmbuf_mtod(ops[i]->sym->m_src, uint8_t *)
-		      + (ops[i]->sym->auth.data.offset >> 3);
+		src = rte_pktmbuf_mtod_offset(ops[i]->sym->m_src, uint8_t *,
+					      (ops[i]->sym->auth.data.offset >> 3));
 		/* Direction from next bit after end of message */
 		num_bytes = length_in_bits >> 3;
 
diff --git a/drivers/crypto/ipsec_mb/pmd_snow3g.c b/drivers/crypto/ipsec_mb/pmd_snow3g.c
index e64df1a462e3..a96779f05942 100644
--- a/drivers/crypto/ipsec_mb/pmd_snow3g.c
+++ b/drivers/crypto/ipsec_mb/pmd_snow3g.c
@@ -248,8 +248,8 @@ process_snow3g_hash_op(struct ipsec_mb_qp *qp, struct rte_crypto_op **ops,
 
 		length_in_bits = ops[i]->sym->auth.data.length;
 
-		src = rte_pktmbuf_mtod(ops[i]->sym->m_src, uint8_t *) +
-				(ops[i]->sym->auth.data.offset >> 3);
+		src = rte_pktmbuf_mtod_offset(ops[i]->sym->m_src, uint8_t *,
+					      (ops[i]->sym->auth.data.offset >> 3));
 		iv = rte_crypto_op_ctod_offset(ops[i], uint8_t *,
 				session->auth_iv_offset);
 
diff --git a/drivers/crypto/ipsec_mb/pmd_zuc.c b/drivers/crypto/ipsec_mb/pmd_zuc.c
index 92fd9d180894..44781be1d107 100644
--- a/drivers/crypto/ipsec_mb/pmd_zuc.c
+++ b/drivers/crypto/ipsec_mb/pmd_zuc.c
@@ -107,13 +107,14 @@ process_zuc_cipher_op(struct ipsec_mb_qp *qp, struct rte_crypto_op **ops,
 		}
 #endif
 
-		src[i] = rte_pktmbuf_mtod(ops[i]->sym->m_src, uint8_t *) +
-				(ops[i]->sym->cipher.data.offset >> 3);
+		src[i] = rte_pktmbuf_mtod_offset(ops[i]->sym->m_src,
+						 uint8_t *,
+						 (ops[i]->sym->cipher.data.offset >> 3));
 		dst[i] = ops[i]->sym->m_dst ?
-			rte_pktmbuf_mtod(ops[i]->sym->m_dst, uint8_t *) +
-				(ops[i]->sym->cipher.data.offset >> 3) :
-			rte_pktmbuf_mtod(ops[i]->sym->m_src, uint8_t *) +
-				(ops[i]->sym->cipher.data.offset >> 3);
+			rte_pktmbuf_mtod_offset(ops[i]->sym->m_dst, uint8_t *,
+						(ops[i]->sym->cipher.data.offset >> 3)) :
+			rte_pktmbuf_mtod_offset(ops[i]->sym->m_src, uint8_t *,
+						(ops[i]->sym->cipher.data.offset >> 3));
 		iv[i] = rte_crypto_op_ctod_offset(ops[i], uint8_t *,
 				sess->cipher_iv_offset);
 		num_bytes[i] = ops[i]->sym->cipher.data.length >> 3;
@@ -159,8 +160,9 @@ process_zuc_hash_op(struct ipsec_mb_qp *qp, struct rte_crypto_op **ops,
 
 		length_in_bits[i] = ops[i]->sym->auth.data.length;
 
-		src[i] = rte_pktmbuf_mtod(ops[i]->sym->m_src, uint8_t *) +
-				(ops[i]->sym->auth.data.offset >> 3);
+		src[i] = rte_pktmbuf_mtod_offset(ops[i]->sym->m_src,
+						 uint8_t *,
+						 (ops[i]->sym->auth.data.offset >> 3));
 		iv[i] = rte_crypto_op_ctod_offset(ops[i], uint8_t *,
 				sess->auth_iv_offset);
 
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;
 
