UPSTREAM: check_whence.py: Add support for filenames with spaces in them

Some vendors save a couple of cents by not including an eeprom for
wifi parameters on their boards. Instead the driver loads these board
specific parameters through the request_firmware mechanism.

Since these are board specific the filenames also must be board specific,
on x86 DMI strings are used for this and the wifi chipname is postfixed
with $sys_vendor-$product_name from the DMI tables. These DMi variables
may contain spaces.

This commit adds support to check_whence.py for filenames with spaces
in them, after this commit these can be specified by putting double-quotes
around them, e.g "name with spaces.bin".

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
(cherry picked from commit be15035deb64042d594f3ee7a1623db1694f92b2
 https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git master)

BUG=chromium:1020597
TEST=`make check`

Change-Id: I73976598465f0c4888246b24b1d9904dc801eabd
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/linux-firmware/+/1898307
Reviewed-by: Douglas Anderson <dianders@chromium.org>
diff --git a/check_whence.py b/check_whence.py
index f83fb19..662c609 100755
--- a/check_whence.py
+++ b/check_whence.py
@@ -5,6 +5,10 @@
 def list_whence():
     with open('WHENCE') as whence:
         for line in whence:
+            match = re.match(r'(?:File|Link|Source):\s*"(.*)"', line)
+            if match:
+                yield match.group(1)
+                continue
             match = re.match(r'(?:File|Link|Source):\s*(\S*)', line)
             if match:
                 yield match.group(1)