OSDN Git Service

mt76x0: Remove VLA usage
authorKees Cook <keescook@chromium.org>
Tue, 7 Aug 2018 22:50:40 +0000 (15:50 -0700)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 9 Aug 2018 15:08:53 +0000 (18:08 +0300)
commit17ad18fd12a35bf84109741415594e21f2577e5e
treeef78bc4a76a6cc41bf340518168b531742bb09c2
parent1b622bd59e9fc4375febf8697684746211eaeb4a
mt76x0: Remove VLA usage

Even with "const" variables, the compiler will generate warnings about
VLA usage. In the quest to remove all VLAs from the kernel[1], this uses
a #define instead of a const to do the array sizing.

[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com

Fixes: e87b5039511a ("mt76x0: eeprom files")
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c