dtoc: Show driver warnings once at the end
At present warnings are shown as soon as they are discovered in the
source scannner. But the function that detects them may be called multiple
times.
Collect all the warnings and show them at the end.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py
index c9c657c..dd97a6b 100644
--- a/tools/dtoc/dtb_platdata.py
+++ b/tools/dtoc/dtb_platdata.py
@@ -1194,8 +1194,7 @@
raise ValueError('Must specify either output or output_dirs, not both')
if not scan:
- scan = src_scan.Scanner(basedir, warning_disabled, drivers_additional,
- phase)
+ scan = src_scan.Scanner(basedir, drivers_additional, phase)
scan.scan_drivers()
do_process = True
else:
@@ -1232,4 +1231,7 @@
plat.out_header(outfile)
outfile.method(plat)
plat.finish_output()
+
+ if not warning_disabled:
+ scan.show_warnings()
return plat