Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ashutosh Dixit <ashutosh.dixit@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH i-g-t 13/16] xe/oa: Fix invalid escape warnings
Date: Fri, 28 Jun 2024 15:23:55 -0700	[thread overview]
Message-ID: <20240628222358.2151036-14-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20240628222358.2151036-1-ashutosh.dixit@intel.com>

From: José Roberto de Souza <jose.souza@intel.com>

Fix this warnings:
SyntaxWarning: invalid escape sequence '\

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
---
 lib/xe/oa-configs/codegen.py           | 12 ++++++------
 lib/xe/oa-configs/mdapi-xml-convert.py |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/xe/oa-configs/codegen.py b/lib/xe/oa-configs/codegen.py
index 9a7d57a33e..f078ef9498 100644
--- a/lib/xe/oa-configs/codegen.py
+++ b/lib/xe/oa-configs/codegen.py
@@ -162,13 +162,13 @@ hw_vars_mapping = {
 }
 
 def is_hw_var(name):
-    m = re.search('\$GtSlice([0-9]+)XeCore([0-9]+)$', name)
+    m = re.search(r'\$GtSlice([0-9]+)XeCore([0-9]+)$', name)
     if m:
         return True
-    m = re.search('\$GtSlice([0-9]+)$', name)
+    m = re.search(r'\$GtSlice([0-9]+)$', name)
     if m:
         return True
-    m = re.search('\$GtSlice([0-9]+)DualSubslice([0-9]+)$', name)
+    m = re.search(r'\$GtSlice([0-9]+)DualSubslice([0-9]+)$', name)
     if m:
         return True
     return name in hw_vars_mapping
@@ -338,13 +338,13 @@ class Gen:
             return self.hw_vars[name]['c']
         if name in set.counter_vars:
             return set.read_funcs[name] + "(perf, metric_set, accumulator)"
-        m = re.search('\$GtSlice([0-9]+)$', name)
+        m = re.search(r'\$GtSlice([0-9]+)$', name)
         if m:
             return 'intel_xe_perf_devinfo_slice_available(&perf->devinfo, {0})'.format(m.group(1))
-        m = re.search('\$GtSlice([0-9]+)DualSubslice([0-9]+)$', name)
+        m = re.search(r'\$GtSlice([0-9]+)DualSubslice([0-9]+)$', name)
         if m:
             return 'intel_xe_perf_devinfo_subslice_available(&perf->devinfo, {0}, {1})'.format(m.group(1), m.group(2))
-        m = re.search('\$GtSlice([0-9]+)XeCore([0-9]+)$', name)
+        m = re.search(r'\$GtSlice([0-9]+)XeCore([0-9]+)$', name)
         if m:
             return 'intel_xe_perf_devinfo_subslice_available(&perf->devinfo, {0}, {1})'.format(m.group(1), m.group(2))
         return None
diff --git a/lib/xe/oa-configs/mdapi-xml-convert.py b/lib/xe/oa-configs/mdapi-xml-convert.py
index ab4747ddd1..575b53e955 100755
--- a/lib/xe/oa-configs/mdapi-xml-convert.py
+++ b/lib/xe/oa-configs/mdapi-xml-convert.py
@@ -228,7 +228,7 @@ counter_blacklist = {
 
 def underscore(name):
     s = re.sub('MHz', 'Mhz', name)
-    s = re.sub('\.', '_', s)
+    s = re.sub(r'\.', '_', s)
     s = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', s)
     s = re.sub('#', '_', s)
     return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s).lower()
-- 
2.41.0


  parent reply	other threads:[~2024-06-28 22:24 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-28 22:23 [PATCH i-g-t 00/16] Intel Xe OA IGT lib and tools Ashutosh Dixit
2024-06-28 22:23 ` [PATCH i-g-t 01/16] lib/xe/oa: Import OA metric generation files from i915 Ashutosh Dixit
2024-06-28 22:23 ` [PATCH i-g-t 02/16] lib/xe/oa: Add LNL metric guids Ashutosh Dixit
2024-06-28 22:23 ` [PATCH i-g-t 03/16] lib/xe/oa: Add OA LNL metrics (oa_lnl.xml) Ashutosh Dixit
2024-06-28 22:23 ` [PATCH i-g-t 04/16] lib/xe/oa: Add truncated legacy Xe1 metrics XML's Ashutosh Dixit
2024-06-28 22:23 ` [PATCH i-g-t 05/16] lib/xe/oa: Generate LNL metrics/registers files Ashutosh Dixit
2024-06-28 22:23 ` [PATCH i-g-t 06/16] lib/xe/oa: Switch generated files to Xe namespace Ashutosh Dixit
2024-06-28 22:23 ` [PATCH i-g-t 07/16] drm-uapi/xe: Sync with Perf/OA changes Ashutosh Dixit
2024-06-28 22:23 ` [PATCH i-g-t 08/16] lib/xe: Complete xe_oa lib functionality Ashutosh Dixit
2024-06-28 22:23 ` [PATCH i-g-t 09/16] tests/intel/xe_query: Add OA units query test Ashutosh Dixit
2024-06-28 22:23 ` [PATCH i-g-t 10/16] lib/xe/oa: Add xe_oa_data_reader to IGT lib Ashutosh Dixit
2024-06-28 22:23 ` [PATCH i-g-t 11/16] tools/xe-perf: Add xe_perf_recorder Ashutosh Dixit
2024-06-28 22:23 ` [PATCH i-g-t 12/16] tools/xe-perf: xe_perf_reader, xe_perf_control and xe_perf_configs Ashutosh Dixit
2024-06-28 22:23 ` Ashutosh Dixit [this message]
2024-06-28 22:23 ` [PATCH i-g-t 14/16] xe/oa/mdapi-xml-convert: Add support for 576B_PEC64LL format Ashutosh Dixit
2024-06-28 22:23 ` [PATCH i-g-t 15/16] xe/oa: Regenerate oa-lnl.xml now parsing all counters Ashutosh Dixit
2024-06-28 22:23 ` [PATCH i-g-t 16/16] xe/oa/oa-metricset-codegen: Fix XE_OA_FORMAT_PEC64u64 offsets Ashutosh Dixit
2024-06-28 23:13 ` ✓ CI.xeBAT: success for Intel Xe OA IGT lib and tools (rev3) Patchwork
2024-06-28 23:23 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-06-29  0:10 ` ✓ CI.xeFULL: success " Patchwork
2024-06-29  0:33 ` ✓ CI.xeBAT: success for Intel Xe OA IGT lib and tools (rev4) Patchwork
2024-06-29  0:42 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-06-29  1:31 ` ✗ CI.xeFULL: " Patchwork
2024-06-29  6:39 ` ✓ CI.xeBAT: success for Intel Xe OA IGT lib and tools (rev5) Patchwork
2024-06-29  6:59 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-06-29  7:40 ` ✓ CI.xeFULL: success " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-06-28 20:43 [PATCH i-g-t v2 00/16] Intel Xe OA IGT lib and tools Ashutosh Dixit
2024-06-28 20:43 ` [PATCH i-g-t 13/16] xe/oa: Fix invalid escape warnings Ashutosh Dixit
2024-06-26 20:54 [PATCH i-g-t 00/16] Intel Xe OA IGT lib and tools Ashutosh Dixit
2024-06-26 20:54 ` [PATCH i-g-t 13/16] xe/oa: Fix invalid escape warnings Ashutosh Dixit

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=20240628222358.2151036-14-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.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