]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit3b64f052758ef945f6d84068ea6ccfe39fc4c112
tree916259532305a72cbef63d5df4e4a3e6daae72e6
parentc59274962d93a7b3aecc3436b3a1f620d30d37e9
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