All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Johan Jonker <jbx6244@gmail.com>, Simon Glass <sjg@chromium.org>
Subject: [PATCH 4/8] dtoc: Correct the re_compat regular expression
Date: Sun,  4 Jul 2021 12:19:46 -0600	[thread overview]
Message-ID: <20210704181950.1917106-5-sjg@chromium.org> (raw)
In-Reply-To: <20210704181950.1917106-1-sjg@chromium.org>

This expects a . before the field name (.e.g '.compatible = ...) but
presently accepts anything at all. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/dtoc/src_scan.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/dtoc/src_scan.py b/tools/dtoc/src_scan.py
index 6c37a71e978..6e8e1ba51a0 100644
--- a/tools/dtoc/src_scan.py
+++ b/tools/dtoc/src_scan.py
@@ -452,8 +452,8 @@ class Scanner:
 
         # Collect the compatible string, e.g. 'rockchip,rk3288-grf'
         compat = None
-        re_compat = re.compile(r'{\s*.compatible\s*=\s*"(.*)"\s*'
-                               r'(,\s*.data\s*=\s*(\S*))?\s*},')
+        re_compat = re.compile(r'{\s*\.compatible\s*=\s*"(.*)"\s*'
+                               r'(,\s*\.data\s*=\s*(\S*))?\s*},')
 
         # This is a dict of compatible strings that were found:
         #    key: Compatible string, e.g. 'rockchip,rk3288-grf'
-- 
2.32.0.93.g670b81a890-goog


  parent reply	other threads:[~2021-07-04 18:20 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-04 18:19 [PATCH 0/8] dtoc: Improvements to warnings Simon Glass
2021-07-04 18:19 ` [PATCH 1/8] dtoc: Avoid using subscripts on match objects Simon Glass
2021-07-05 18:04   ` Walter Lozano
2021-07-11 23:00   ` Simon Glass
2021-07-04 18:19 ` [PATCH 2/8] dtoc: Convert to use ArgumentParser Simon Glass
2021-07-05 18:04   ` Walter Lozano
2021-07-11 23:00   ` Simon Glass
2021-07-04 18:19 ` [PATCH 3/8] dtoc: Allow multiple warnings for a driver Simon Glass
2021-07-05 18:04   ` Walter Lozano
2021-07-11 23:00   ` Simon Glass
2021-07-12  2:23     ` Simon Glass
2021-07-04 18:19 ` Simon Glass [this message]
2021-07-05 18:04   ` [PATCH 4/8] dtoc: Correct the re_compat regular expression Walter Lozano
2021-07-11 23:00   ` Simon Glass
2021-07-04 18:19 ` [PATCH 5/8] dtoc: Add a stdout check in test_normalized_name() Simon Glass
2021-07-04 18:19 ` [PATCH 6/8] dtoc: Detect unexpected suffix on .of_match Simon Glass
2021-07-04 18:19 ` [PATCH 7/8] dtoc: Detect drivers which do not parse correctly Simon Glass
2021-07-05 18:04   ` Walter Lozano
2021-07-11 23:00   ` Simon Glass
2021-07-04 18:19 ` [PATCH 8/8] dtoc: Update documentation to cover warnings in more detail Simon Glass
2021-07-05 18:04   ` Walter Lozano
2021-07-20 18:32     ` Simon Glass
2021-07-11 23:00   ` Simon Glass
2021-07-11 23:00 ` [PATCH 6/8] dtoc: Detect unexpected suffix on .of_match Simon Glass
2021-07-11 23:00 ` [PATCH 5/8] dtoc: Add a stdout check in test_normalized_name() Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210704181950.1917106-5-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=jbx6244@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.