Prefer structure assignment over memcpy.
Found by cocci/struct_assign.cocci

Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
---
 drivers/dma/dpaa2/dpaa2_qdma.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/dma/dpaa2/dpaa2_qdma.c b/drivers/dma/dpaa2/dpaa2_qdma.c
index 3c9a7b5485..c0e0a44e84 100644
--- a/drivers/dma/dpaa2/dpaa2_qdma.c
+++ b/drivers/dma/dpaa2/dpaa2_qdma.c
@@ -171,9 +171,7 @@ dpaa2_qdma_multi_eq(struct qdma_virt_queue *qdma_vq)
        if (unlikely(num_tx != qdma_vq->fd_idx)) {
                dst_idx = 0;
                for (idx = num_tx; idx < qdma_vq->fd_idx; idx++) {
-                       rte_memcpy(&qdma_vq->fd[dst_idx],
-                               &qdma_vq->fd[idx],
-                               sizeof(struct qbman_fd));
+                       qdma_vq->fd[dst_idx] = qdma_vq->fd[idx];
                        dst_idx++;
                }
        }
-- 
2.47.2

Reply via email to