]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
wimax/i2400m: Remove VLAIS
authorBehan Webster <behanw@converseincode.com>
Mon, 9 Oct 2017 19:41:53 +0000 (12:41 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Oct 2017 19:35:05 +0000 (12:35 -0700)
Convert Variable Length Array in Struct (VLAIS) to valid C by converting
local struct definition to use a flexible array. The structure is only
used to define a cast of a buffer so the size of the struct is not used
to allocate storage.

Signed-off-by: Behan Webster <behanw@converseincode.com>
Signed-off-by: Mark Charebois <charlebm@gmail.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wimax/i2400m/fw.c

index c9c711dcd0e6bb9d7ce988f42bc7e6dd7877a37b..a89b5685e68b36d5735bc9591f97f621440cb424 100644 (file)
@@ -652,7 +652,7 @@ static int i2400m_download_chunk(struct i2400m *i2400m, const void *chunk,
        struct device *dev = i2400m_dev(i2400m);
        struct {
                struct i2400m_bootrom_header cmd;
-               u8 cmd_payload[chunk_len];
+               u8 cmd_payload[];
        } __packed *buf;
        struct i2400m_bootrom_header ack;