Autogenerated with cocci/mtod-offset.cocci.

Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
---
 drivers/crypto/caam_jr/caam_jr.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

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 =
-- 
2.39.2

Reply via email to