diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-02-27 22:51:38 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-03-01 09:16:11 -0500 |
commit | 426396397f159dba386e9ed4abf9f18f3697ecab (patch) | |
tree | 5a4f84b80a3c355162719da59f647337e55381fb | |
parent | 40c532d27bda036dc4e626a7f45e0de1d1000c37 (diff) | |
download | u-boot-WIP/01Mar2024.zip u-boot-WIP/01Mar2024.tar.gz u-boot-WIP/01Mar2024.tar.bz2 |
dtoc: avoid invalid escape sequence '\s'WIP/01Mar2024
\s is not a valid escape sequence in strings.
Mark regular expressions with r''.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-rw-r--r-- | tools/dtoc/src_scan.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/dtoc/src_scan.py b/tools/dtoc/src_scan.py index 3bef59d..2437200 100644 --- a/tools/dtoc/src_scan.py +++ b/tools/dtoc/src_scan.py @@ -291,8 +291,8 @@ class Scanner: """ structs = {} - re_struct = re.compile('^struct ([a-z0-9_]+) {$') - re_asm = re.compile('../arch/[a-z0-9]+/include/asm/(.*)') + re_struct = re.compile(r'^struct ([a-z0-9_]+) {$') + re_asm = re.compile(r'../arch/[a-z0-9]+/include/asm/(.*)') prefix = '' for line in buff.splitlines(): # Handle line continuation @@ -470,8 +470,8 @@ class Scanner: re_of_match = re.compile( r'\.of_match\s*=\s*(of_match_ptr\()?([a-z0-9_]+)([^,]*),') - re_phase = re.compile('^\s*DM_PHASE\((.*)\).*$') - re_hdr = re.compile('^\s*DM_HEADER\((.*)\).*$') + re_phase = re.compile(r'^\s*DM_PHASE\((.*)\).*$') + re_hdr = re.compile(r'^\s*DM_HEADER\((.*)\).*$') re_alias = re.compile(r'DM_DRIVER_ALIAS\(\s*(\w+)\s*,\s*(\w+)\s*\)') # Matches the struct name for priv, plat |