[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <522019263c16fbee2df8ddbcad2f4d5294ce0122.1738171937.git.mchehab+huawei@kernel.org>
Date: Wed, 29 Jan 2025 18:39:08 +0100
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Jonathan Corbet <corbet@....net>,
Linux Doc Mailing List <linux-doc@...r.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
"Mauro Carvalho Chehab" <mchehab+huawei@...nel.org>,
H Hartley Sweeten <hsweeten@...ionengravers.com>,
Ian Abbott <abbotti@....co.uk>,
linux-kernel@...r.kernel.org
Subject: [PATCH 6/6] comedi: convert_csv_to_c.py: use r-string for a regex expression
Modern Python versions complain about usage of "\" inside normal
strings, as they should use r-string notation.
Change the annotations there to avoid such warnings:
drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py:47: SyntaxWarning: invalid escape sequence '\('
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
---
drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py b/drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py
index 90378fb50580..d19101fc2a94 100755
--- a/drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py
+++ b/drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py
@@ -44,7 +44,7 @@ def routedict_to_structinit_single(name, D, return_name=False):
lines.append('\t\t[B({})] = {{'.format(D0_sig))
for D1_sig, value in D1:
- if not re.match('[VIU]\([^)]*\)', value):
+ if not re.match(r'[VIU]\([^)]*\)', value):
sys.stderr.write('Invalid register format: {}\n'.format(repr(value)))
sys.stderr.write(
'Register values should be formatted with V(),I(),or U()\n')
--
2.48.1
Powered by blists - more mailing lists