summaryrefslogtreecommitdiff
path: root/tools/buildman
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-11-06 16:02:11 -0700
committerSimon Glass <sjg@chromium.org>2018-11-20 19:14:22 -0700
commit2d48333e447e8cc5a2bd3eaed6be657925cbee16 (patch)
treeedfd172476ec90dfafd26b2d3a048321519f4101 /tools/buildman
parent40232c91d70f4f2066408cabf1afba1deb190df6 (diff)
buildman: Detect dtc warnings
At present messages from the device-tree compiler like this: arch/arm/dts/socfpga_arria10_socdk_sdmmc.dtb: Warning (avoid_unnecessary_addr_size): /clocks: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property are detected as errors since they don't match the gcc warning regex. Add a new one for dtc to fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman')
-rw-r--r--tools/buildman/builder.py4
-rw-r--r--tools/buildman/test.py5
2 files changed, 6 insertions, 3 deletions
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index 05f8299541..fc80705a45 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -290,6 +290,7 @@ class Builder:
self._re_function = re.compile('(.*): In function.*')
self._re_files = re.compile('In file included from.*')
self._re_warning = re.compile('(.*):(\d*):(\d*): warning: .*')
+ self._re_dtb_warning = re.compile('(.*): Warning .*')
self._re_note = re.compile('(.*):(\d*):(\d*): note: this is the location of the previous.*')
self.queue = Queue.Queue()
@@ -788,7 +789,8 @@ class Builder:
self._re_files.match(line)):
last_func = line
else:
- is_warning = self._re_warning.match(line)
+ is_warning = (self._re_warning.match(line) or
+ self._re_dtb_warning.match(line))
is_note = self._re_note.match(line)
if is_warning or (last_was_warning and is_note):
if last_func:
diff --git a/tools/buildman/test.py b/tools/buildman/test.py
index 61a462655f..5c82c50793 100644
--- a/tools/buildman/test.py
+++ b/tools/buildman/test.py
@@ -46,8 +46,9 @@ make[1]: *** [main.o] Error 1
make: *** [common/libcommon.o] Error 2
Make failed
''',
- '''main.c: In function 'main_loop3':
-main.c:280:6: warning: unused variable 'mary' [-Wunused-variable]
+ '''arch/arm/dts/socfpga_arria10_socdk_sdmmc.dtb: Warning \
+(avoid_unnecessary_addr_size): /clocks: unnecessary #address-cells/#size-cells \
+without "ranges" or child "reg" property
''',
'''powerpc-linux-ld: warning: dot moved backwards before `.bss'
powerpc-linux-ld: warning: dot moved backwards before `.bss'