| From: Andrew Ballance <andrewjballance@gmail.com> |
| Subject: scripts/gdb/symbols: fix invalid escape sequence warning |
| Date: Sun, 3 Mar 2024 19:25:07 -0600 |
| |
| With python 3.12, '\.' results in this warning |
| SyntaxWarning: invalid escape sequence '\.' |
| |
| Link: https://lkml.kernel.org/r/20240304012507.240380-1-andrewjballance@gmail.com |
| Signed-off-by: Andrew Ballance <andrewjballance@gmail.com> |
| Cc: Jan Kiszka <jan.kiszka@siemens.com> |
| Cc: Kieran Bingham <kbingham@kernel.org> |
| Cc: Koudai Iwahori <koudai@google.com> |
| Cc: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com> |
| Cc: Luis Chamberlain <mcgrof@kernel.org> |
| Cc: Pankaj Raghav <p.raghav@samsung.com> |
| Cc: Shuah Khan <skhan@linuxfoundation.org> |
| Signed-off-by: Andrew Morton <akpm@linux-foundation.org> |
| --- |
| |
| scripts/gdb/linux/symbols.py | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| --- a/scripts/gdb/linux/symbols.py~scripts-gdb-symbols-fix-invalid-escape-sequence-warning |
| +++ a/scripts/gdb/linux/symbols.py |
| @@ -82,7 +82,7 @@ lx-symbols command.""" |
| self.module_files_updated = True |
| |
| def _get_module_file(self, module_name): |
| - module_pattern = ".*/{0}\.ko(?:.debug)?$".format( |
| + module_pattern = r".*/{0}\.ko(?:.debug)?$".format( |
| module_name.replace("_", r"[_\-]")) |
| for name in self.module_files: |
| if re.match(module_pattern, name) and os.path.exists(name): |
| _ |