Re: [PATCH 3/8] drivers/bus: require probe function for NXP drivers

Kevin Traynor
2026-03-23T16:59:49Z

On 3/23/26 10:52 AM, David Marchand wrote:
> Rather than silently ignore an invalid driver, enforce every registered
> driver has a probe callback.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> drivers/bus/dpaa/dpaa_bus.c | 6 +++---
> drivers/bus/fslmc/fslmc_bus.c | 7 +------
> 2 files changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
> index d9830b68ca..5e0f32bfe8 100644
> --- a/drivers/bus/dpaa/dpaa_bus.c
> +++ b/drivers/bus/dpaa/dpaa_bus.c
> @@ -614,6 +614,7 @@ void
> rte_dpaa_driver_register(struct rte_dpaa_driver *driver)
> {
> RTE_VERIFY(driver);
> + RTE_VERIFY(driver->probe != NULL);
>
> BUS_INIT_FUNC_TRACE();
>
> @@ -808,9 +809,8 @@ rte_dpaa_bus_probe(void)
> if (rte_dev_is_probed(&dev->device))
> continue;
>
> - if (!drv->probe ||
> - (dev->device.devargs &&
> - dev->device.devargs->policy == RTE_DEV_BLOCKED))
> + if (dev->device.devargs &&
> + dev->device.devargs->policy == RTE_DEV_BLOCKED)
> continue;
>
> if (probe_all ||
> diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
> index abdb0ad50d..ac9fb7a08c 100644
> --- a/drivers/bus/fslmc/fslmc_bus.c
> +++ b/drivers/bus/fslmc/fslmc_bus.c
> @@ -465,9 +465,6 @@ rte_fslmc_probe(void)
> if (ret)
> continue;
>
> - if (!drv->probe)
> - continue;
> -
> if (rte_dev_is_probed(&dev->device))
> continue;
>
> @@ -534,6 +531,7 @@ void
> rte_fslmc_driver_register(struct rte_dpaa2_driver *driver)
> {
> RTE_VERIFY(driver);
> + RTE_VERIFY(driver->probe != NULL);
>
> TAILQ_INSERT_TAIL(&rte_fslmc_bus.driver_list, driver, next);
> }
> @@ -601,9 +599,6 @@ fslmc_bus_plug(struct rte_device *rte_dev)
> if (ret)
> continue;
>
> - if (!drv->probe)
> - continue;
> -
> if (rte_dev_is_probed(&dev->device))
> continue;
>

Acked-by: Kevin Traynor <ktraynor@redhat.com>