mirror of
https://xff.cz/git/u-boot/
synced 2025-09-23 11:32:12 +02:00
dtoc: avoid invalid escape sequence '\s'
\s is not a valid escape sequence in strings. Mark regular expressions with r''. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
committed by
Tom Rini
parent
d4c84d7062
commit
cf6280371f
@@ -291,8 +291,8 @@ class Scanner:
|
|||||||
"""
|
"""
|
||||||
structs = {}
|
structs = {}
|
||||||
|
|
||||||
re_struct = re.compile('^struct ([a-z0-9_]+) {$')
|
re_struct = re.compile(r'^struct ([a-z0-9_]+) {$')
|
||||||
re_asm = re.compile('../arch/[a-z0-9]+/include/asm/(.*)')
|
re_asm = re.compile(r'../arch/[a-z0-9]+/include/asm/(.*)')
|
||||||
prefix = ''
|
prefix = ''
|
||||||
for line in buff.splitlines():
|
for line in buff.splitlines():
|
||||||
# Handle line continuation
|
# Handle line continuation
|
||||||
@@ -470,8 +470,8 @@ class Scanner:
|
|||||||
re_of_match = re.compile(
|
re_of_match = re.compile(
|
||||||
r'\.of_match\s*=\s*(of_match_ptr\()?([a-z0-9_]+)([^,]*),')
|
r'\.of_match\s*=\s*(of_match_ptr\()?([a-z0-9_]+)([^,]*),')
|
||||||
|
|
||||||
re_phase = re.compile('^\s*DM_PHASE\((.*)\).*$')
|
re_phase = re.compile(r'^\s*DM_PHASE\((.*)\).*$')
|
||||||
re_hdr = re.compile('^\s*DM_HEADER\((.*)\).*$')
|
re_hdr = re.compile(r'^\s*DM_HEADER\((.*)\).*$')
|
||||||
re_alias = re.compile(r'DM_DRIVER_ALIAS\(\s*(\w+)\s*,\s*(\w+)\s*\)')
|
re_alias = re.compile(r'DM_DRIVER_ALIAS\(\s*(\w+)\s*,\s*(\w+)\s*\)')
|
||||||
|
|
||||||
# Matches the struct name for priv, plat
|
# Matches the struct name for priv, plat
|
||||||
|
Reference in New Issue
Block a user