ath9k: dfs: remove accidental use of stack VLA
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Fri, 30 Mar 2018 18:34:01 +0000 (13:34 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 10 Apr 2018 14:32:44 +0000 (17:32 +0300)
commit9c27489a34548913baaaf3b2776e05d4a9389e3e
tree916259532305a72cbef63d5df4e4a3e6daae72e6
parent6ce36faeac353813b0bfd3b9bc867f3e0d6a35b2
ath9k: dfs: remove accidental use of stack VLA

In preparation to enabling -Wvla, remove accidental use of stack VLA.

This avoids an accidental stack VLA (since the compiler thinks
the value of FFT_NUM_SAMPLES can change, even when marked
"const"). This just replaces it with a #define.

Also, fixed as part of the directive to remove all VLAs from
the kernel: https://lkml.org/lkml/2018/3/7/621

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath9k/dfs.c