mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Jonathan Corbet <corbet@lwn.net>,
	Linux Doc Mailing List <linux-doc@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	"Mauro Carvalho Chehab" <mchehab+huawei@kernel.org>,
	H Hartley Sweeten <hsweeten@visionengravers.com>,
	Ian Abbott <abbotti@mev.co.uk>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 6/6] comedi: convert_csv_to_c.py: use r-string for a regex expression
Date: Wed, 29 Jan 2025 18:39:08 +0100	[thread overview]
Message-ID: <522019263c16fbee2df8ddbcad2f4d5294ce0122.1738171937.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1738171937.git.mchehab+huawei@kernel.org>

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@kernel.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


      parent reply	other threads:[~2025-01-29 17:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-29 17:39 [PATCH 0/6] Address some issues related to Python version Mauro Carvalho Chehab
2025-01-29 17:39 ` [PATCH 1/6] docs: trace: decode_msr.py: make it compatible with python 3 Mauro Carvalho Chehab
2025-01-29 17:39 ` [PATCH 2/6] tools: perf: exported-sql-viewer: drop support for Python 2 Mauro Carvalho Chehab
2025-01-29 17:39 ` [PATCH 3/6] tools: perf: " Mauro Carvalho Chehab
2025-01-30  7:00   ` Adrian Hunter
2025-02-11  6:59     ` Mauro Carvalho Chehab
2025-01-29 17:39 ` [PATCH 4/6] tools: perf: task-analyzer: " Mauro Carvalho Chehab
2025-01-29 17:39 ` [PATCH 5/6] tools: selftests/bpf: test_bpftool_synctypes: escape raw symbols Mauro Carvalho Chehab
2025-01-29 20:13   ` Quentin Monnet
2025-01-29 17:39 ` Mauro Carvalho Chehab [this message]

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=522019263c16fbee2df8ddbcad2f4d5294ce0122.1738171937.git.mchehab+huawei@kernel.org \
    --to=mchehab+huawei@kernel.org \
    --cc=abbotti@mev.co.uk \
    --cc=corbet@lwn.net \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®