[PATCH v6 09/12] of: overlay: add more debugging prints to of_overlay_matches_filter
Marco Felsch
m.felsch at pengutronix.de
Wed Aug 20 02:48:41 PDT 2025
Add debug output to spot early returns easily.
Signed-off-by: Marco Felsch <m.felsch at pengutronix.de>
---
drivers/of/overlay.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index 6b19c7c88ea5e99040bddca172c47251e8ddda84..d2cf2fa3f371c5f96027c92c30a0316e0caa860a 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -288,16 +288,22 @@ static bool of_overlay_matches_filter(const char *pattern, struct device_node *o
free(path);
/* No filter found at all, no match */
- if (!have_pattern_filter && !have_content_filter)
+ if (!have_pattern_filter && !have_content_filter) {
+ pr_debug("No match, because no filter was found\n");
return false;
+ }
/* Want to match pattern, but we do not have a filename_filter */
- if (pattern && !have_pattern_filter)
+ if (pattern && !have_pattern_filter) {
+ pr_debug("Pattern match requested, but no pattern filter found\n");
return true;
+ }
/* Want to match content, but we do not have a content_filter */
- if (ovl && !have_content_filter)
+ if (ovl && !have_content_filter) {
+ pr_debug("Content match requested, but no content filter found\n");
return true;
+ }
if (apply)
pr_debug("pattern %s, overlay %p: match against filter %s\n",
--
2.39.5
More information about the barebox
mailing list