Skip to contentSkip to conversation

list-workarounds: Don't add an already present platform

PATCH New Damien Lespiau 1 participant 1 message May 10, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 list-workarounds: Don't add an already present platform

Currently if we come across several sites that say that a specific workaround is implemented for a platform, we just add the platform several times to the list. eg.

WaFbcDisableDpfcClockGating: ivb, hsw, ivb, hsw

This patch prevent that by only adding the plaform if it's not already there.

---
 scripts/list-workarounds | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
scripts/list-workarounds +4 -1
index 7bfd82d..6c8c636 100755
@@ -47,7 +47,10 @@ def parse(me):
 		platforms = match.group('platforms')
 
 		if wa_name in workarounds:
-			workarounds[wa_name] += parse_platforms(platforms)
+			platforms = parse_platforms(platforms)
+			for p in platforms:
+				if not p in workarounds[wa_name]:
+					workarounds[wa_name].append(p)
 		else:
 			workarounds[wa_name] = parse_platforms(platforms)
 
Signature · 1 line
1.8.1.4