|SUCCESS| [2/2] dma/dpaa2: fix dpaa2_qdma_remove always returning success
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Sat May 16 12:37:31 CEST 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/164046
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-05-16
I will analyze this patch series for correctness bugs, coding style compliance, API requirements, and guideline violations.
```
git sha: b5721f271cbf (referenced in Fixes tag)
Author: Md Shofiqul Islam <shofiqtest at gmail.com>
Subject: [PATCH 1/2] bus/fslmc: fix ignored return value in fslmc_bus_unplug
This patch captures and propagates the return value from drv->remove()
in fslmc_bus_unplug(). Previously the return was discarded, preventing
detection of removal failures.
> diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
> index cf881b3eec..9cfd8b10ba 100644
> --- a/drivers/bus/fslmc/fslmc_bus.c
> +++ b/drivers/bus/fslmc/fslmc_bus.c
> @@ -620,7 +620,9 @@ fslmc_bus_unplug(struct rte_device *rte_dev)
> struct rte_dpaa2_driver *drv = dev->driver;
>
> if (drv && drv->remove) {
> - drv->remove(dev);
> + int ret = drv->remove(dev);
> + if (ret)
> + return ret;
> dev->driver = NULL;
> dev->device.driver = NULL;
> DPAA2_BUS_INFO("%s Un-Plugged", dev->device.name);
The coding style guide prohibits implicit comparisons of non-boolean
types. The check "if (ret)" at line +624 should be an explicit
comparison: "if (ret != 0)".
Can this function return an uninitialized value when drv is NULL or
drv->remove is NULL? If the if condition at line 622 is false, ret is
never set but the function appears to reach its end without an explicit
return statement for that path.
[ ... ]
git sha: 8caf8427f85a (referenced in Fixes tag)
Author: Md Shofiqul Islam <shofiqtest at gmail.com>
Subject: [PATCH 2/2] dma/dpaa2: fix dpaa2_qdma_remove always returning success
This patch changes dpaa2_qdma_remove() to propagate the error code from
rte_dma_pmd_release() instead of unconditionally returning 0.
> diff --git a/drivers/dma/dpaa2/dpaa2_qdma.c b/drivers/dma/dpaa2/dpaa2_qdma.c
> index beca464c72..f7d94bb799 100644
> --- a/drivers/dma/dpaa2/dpaa2_qdma.c
> +++ b/drivers/dma/dpaa2/dpaa2_qdma.c
> @@ -1739,7 +1739,7 @@ dpaa2_qdma_remove(struct rte_dpaa2_device *dpaa2_dev)
> if (ret)
> DPAA2_QDMA_ERR("Device cleanup failed");
>
> - return 0;
> + return ret;
> }
This change looks correct and improves error handling. The existing code
at line 1739 already uses the implicit comparison "if (ret)" which
violates the coding style, but that is pre-existing and not introduced
by this patch.
```
More information about the test-report
mailing list