[PATCH i-g-t v2 1/2] i915/perf: Fix invalid escape warnings

Dixit, Ashutosh ashutosh.dixit at intel.com
Mon Nov 4 20:56:53 UTC 2024


On Mon, 04 Nov 2024 12:51:59 -0800, José Roberto de Souza wrote:
>
> Fix this warnings:
> SyntaxWarning: invalid escape sequence '\
>
> A similar change was done in the Xe KMD script in commit
> 287917575616 ("xe/oa: Fix invalid escape warnings").

Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>

> Cc: Ashutosh Dixit <ashutosh.dixit at intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
> ---
>  lib/i915/perf-configs/mdapi-xml-convert.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/i915/perf-configs/mdapi-xml-convert.py b/lib/i915/perf-configs/mdapi-xml-convert.py
> index ba0b7ba473..db093b60f6 100755
> --- a/lib/i915/perf-configs/mdapi-xml-convert.py
> +++ b/lib/i915/perf-configs/mdapi-xml-convert.py
> @@ -222,7 +222,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.47.0
>


More information about the igt-dev mailing list