[Pdbg] [PATCH v2 04/15] path: Add device tree path based targeting
Alistair Popple
alistair at popple.id.au
Tue Nov 13 13:32:03 AEDT 2018
I didn't go through all the possible paths for parsing a path but it looks
pretty reasonable. I guess we could have tests for some of these parsing
functions directly, but I assume your later patch ("Add path based selection
tests") exercises these well enough anyway.
One minor comment below but otherwise:
Reviewed-by: Alistair Popple <alistair at popple.id.au>
> +/**
> + * @brief Macro for iterating through all path targets
> + *
> + * target is of type struct pdbg_target
> + *
> + * If only_enabled is true, iterate through targets that are enabled;
> + * otherwise iterate through all targets
This is no longer relevant/up to date.
> + */
> +#define for_each_path_target(target) \
> + for (target = path_target_next(NULL); \
> + target; \
> + target = path_target_next(target))
> +
> +/**
> + * @brief Macro for iterating through all path targets of specific class
> + *
> + * class is of type char *
> + * target is of type struct pdbg_target
> + *
> + * If only_enabled is true, iterate through targets that are enabled;
> + * otherwise iterate through all targets
Ditto.
> + */
> +#define for_each_path_target_class(class, target) \
> + for (target = path_target_next_class(class, NULL); \
> + target; \
> + target = path_target_next_class(class, target))
> +
> +#endif
More information about the Pdbg
mailing list