summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/ar9003_aic.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-02-12 14:55:21 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2016-03-03 20:27:17 +0300
commite9a26010f607621597f25e55d94faf85a2d0d5a4 (patch)
tree23b2ef3528087972879215f7319699b0d7dc8070 /drivers/net/wireless/ath/ath9k/ar9003_aic.h
parent82def495d118c6d36300c1cf2448c276273be603 (diff)
downloadlinux-e9a26010f607621597f25e55d94faf85a2d0d5a4.tar.xz
ath9k: reduce stack usage in ar9003_aic_cal_post_process
In some configurations, this function uses more than the warning limit of 1024 bytes: drivers/net/wireless/ath/ath9k/ar9003_aic.c: In function 'ar9003_aic_cal_post_process': drivers/net/wireless/ath/ath9k/ar9003_aic.c:434:1: error: the frame size of 1040 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] It turns out that there are two large arrays on the stack here, but almost all the data in them is never used outside of the loop in which it gets written, so we can replace the array with a single instance. The .valid flag is used later, so I'm replacing the array of structures with an array of bools. An obvious follow-up optimization would be to replace it with a bitmask and set_bit()/find_first_bit()/ find_last_bit()/... operations. However, I have not tested this patch, so I sticked to the simpler transformation that does the job of reducing the stack usage to a harmless level. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar9003_aic.h')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_aic.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_aic.h b/drivers/net/wireless/ath/ath9k/ar9003_aic.h
index 86f40644be43..9512c63799f2 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_aic.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_aic.h
@@ -50,7 +50,6 @@ struct ath_aic_sram_info {
struct ath_aic_out_info {
int16_t dir_path_gain_lin;
int16_t quad_path_gain_lin;
- struct ath_aic_sram_info sram;
};
u8 ar9003_aic_calibration(struct ath_hw *ah);