This error is seen in build of type "minsize":
drivers/dma/dpaa/dpaa_qdma.c:564:48: error:
'dq_complete' may be used uninitialized [-Werror=maybe-uninitialized]
It looks to be a compiler issue because we leave the loop
if rte_ring_dequeue() fails, before using dq_complete.
The variable is initialized to allow compiling with "minsize" option.
Fixes: f1d30e2786b6 ("dma/dpaa: refactor driver")
Signed-off-by: Cheryl Bansal <[email protected]>
---
drivers/dma/dpaa/dpaa_qdma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/dpaa/dpaa_qdma.c b/drivers/dma/dpaa/dpaa_qdma.c
index d8bece700a..6474dcd9c8 100644
--- a/drivers/dma/dpaa/dpaa_qdma.c
+++ b/drivers/dma/dpaa/dpaa_qdma.c
@@ -533,7 +533,7 @@ dpaa_qdma_block_dequeue(struct fsl_qdma_engine *fsl_qdma,
uint32_t reg;
int ret;
uint8_t *block;
- uint16_t *dq_complete;
+ uint16_t *dq_complete = NULL;
struct fsl_qdma_desc *desc[FSL_QDMA_SG_MAX_ENTRY];
stat_queue = &fsl_qdma->stat_queues[block_id];
--
2.43.0