[dpdk-dev] [PATCH v7 07/15] bus: add bus iterator to find a device
Thomas Monjalon
thomas at monjalon.net
Fri Jun 30 11:17:15 CEST 2017
29/06/2017 20:21, Jan Blunck:
> +struct rte_device *
> +rte_bus_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
> + const void *data)
> +{
> + struct rte_bus *bus;
> + struct rte_device *dev = NULL;
> +
> + TAILQ_FOREACH(bus, &rte_bus_list, next) {
> + dev = bus->find_device(start, cmp, data);
> + if (dev)
Same nit as previous patch,
better to make explicit dev != NULL.
> + break;
> + }
> + return dev;
> +}
More information about the dev
mailing list