[PATCH v2 3/7] drivers/comedi: fix Python string escapes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: linux-ia64@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-doc@xxxxxxxxxxxxxxx, llvm@xxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx
- Subject: [PATCH v2 3/7] drivers/comedi: fix Python string escapes
- From: Benjamin Gray <bgray@xxxxxxxxxxxxx>
- Date: Tue, 12 Sep 2023 16:07:57 +1000
- Cc: Jonathan Corbet <corbet@xxxxxxx>, Ian Abbott <abbotti@xxxxxxxxx>, H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>, Nathan Chancellor <nathan@xxxxxxxxxx>, Nick Desaulniers <ndesaulniers@xxxxxxxxxx>, Tom Rix <trix@xxxxxxxxxx>, Jan Kiszka <jan.kiszka@xxxxxxxxxxx>, Kieran Bingham <kbingham@xxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>, Jiri Olsa <jolsa@xxxxxxxxxx>, Namhyung Kim <namhyung@xxxxxxxxxx>, Ian Rogers <irogers@xxxxxxxxxx>, Adrian Hunter <adrian.hunter@xxxxxxxxx>, linux-perf-users@xxxxxxxxxxxxxxx, Todd E Brandt <todd.e.brandt@xxxxxxxxxxxxxxx>, Andrii Nakryiko <andrii@xxxxxxxxxx>, Mykola Lysenko <mykolal@xxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>, Benjamin Gray <bgray@xxxxxxxxxxxxx>
- In-reply-to: <20230912060801.95533-1-bgray@linux.ibm.com>
- References: <20230912060801.95533-1-bgray@linux.ibm.com>
Python 3.6 introduced a DeprecationWarning for invalid escape sequences.
This is upgraded to a SyntaxWarning in Python 3.12, and will eventually
be a syntax error.
Fix these now to get ahead of it before it's an error.
Signed-off-by: Benjamin Gray <bgray@xxxxxxxxxxxxx>
---
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.41.0
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]