[PATCH] devtools: fix symbol change check for non-lib patches
Ali Alnubani
alialnu at nvidia.com
Thu Mar 5 10:10:39 CET 2026
Initialize lib var per patch file and skip symbol handling when no
lib/drivers file header was seen. Avoids NameError exception when
processing patches that only touch docs or other paths.
Fixes: 1a0c104a7fa9 ("build: generate symbol maps")
Cc: david.marchand at redhat.com
Signed-off-by: Ali Alnubani <alialnu at nvidia.com>
---
devtools/check-symbol-change.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/devtools/check-symbol-change.py b/devtools/check-symbol-change.py
index 1efeb82fcd..4cee4c765c 100755
--- a/devtools/check-symbol-change.py
+++ b/devtools/check-symbol-change.py
@@ -29,6 +29,7 @@
symbols = {}
for file in args.patch:
+ lib = None
for ln in file.readlines():
if file_header_regexp.match(ln):
if file_header_regexp.match(ln).group(2) == "lib":
@@ -54,6 +55,8 @@
else:
continue
+ if lib is None:
+ continue
if symbol not in symbols[lib]:
symbols[lib][symbol] = {}
added = ln[0] == "+"
--
2.53.0
More information about the dev
mailing list