diff options
author | Joe Perches <joe@perches.com> | 2014-02-21 17:46:43 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-02-24 15:38:38 -0500 |
commit | 2120ac96744f9517f19241b7c0adb796eeb53eb6 (patch) | |
tree | 4a8c591d4b8a0064d659d4e7f7a5bf147c0353a2 /drivers/net/wireless/ath/ath9k | |
parent | 443626e5a956d0c740034e53cf4164c2c1069cd4 (diff) |
ath9k: Use static const
Trivially reduces text size too.
$ size drivers/net/wireless/ath/ath9k/debug.o*
text data bss dec hex filename
34436 2528 5128 42092 a46c drivers/net/wireless/ath/ath9k/debug.o.new
34464 2528 5128 42120 a488 drivers/net/wireless/ath/ath9k/debug.o.old
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index f42ed3b17330..f8924efdad55 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c | |||
@@ -135,7 +135,8 @@ static ssize_t read_file_ani(struct file *file, char __user *user_buf, | |||
135 | struct ath_softc *sc = file->private_data; | 135 | struct ath_softc *sc = file->private_data; |
136 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 136 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
137 | struct ath_hw *ah = sc->sc_ah; | 137 | struct ath_hw *ah = sc->sc_ah; |
138 | unsigned int len = 0, size = 1024; | 138 | unsigned int len = 0; |
139 | const unsigned int size = 1024; | ||
139 | ssize_t retval = 0; | 140 | ssize_t retval = 0; |
140 | char *buf; | 141 | char *buf; |
141 | 142 | ||
@@ -307,13 +308,13 @@ static ssize_t read_file_antenna_diversity(struct file *file, | |||
307 | struct ath_antenna_stats *as_main = &sc->debug.stats.ant_stats[ANT_MAIN]; | 308 | struct ath_antenna_stats *as_main = &sc->debug.stats.ant_stats[ANT_MAIN]; |
308 | struct ath_antenna_stats *as_alt = &sc->debug.stats.ant_stats[ANT_ALT]; | 309 | struct ath_antenna_stats *as_alt = &sc->debug.stats.ant_stats[ANT_ALT]; |
309 | struct ath_hw_antcomb_conf div_ant_conf; | 310 | struct ath_hw_antcomb_conf div_ant_conf; |
310 | unsigned int len = 0, size = 1024; | 311 | unsigned int len = 0; |
312 | const unsigned int size = 1024; | ||
311 | ssize_t retval = 0; | 313 | ssize_t retval = 0; |
312 | char *buf; | 314 | char *buf; |
313 | char *lna_conf_str[4] = {"LNA1_MINUS_LNA2", | 315 | static const char *lna_conf_str[4] = { |
314 | "LNA2", | 316 | "LNA1_MINUS_LNA2", "LNA2", "LNA1", "LNA1_PLUS_LNA2" |
315 | "LNA1", | 317 | }; |
316 | "LNA1_PLUS_LNA2"}; | ||
317 | 318 | ||
318 | buf = kzalloc(size, GFP_KERNEL); | 319 | buf = kzalloc(size, GFP_KERNEL); |
319 | if (buf == NULL) | 320 | if (buf == NULL) |
@@ -716,10 +717,13 @@ static ssize_t read_file_queues(struct file *file, char __user *user_buf, | |||
716 | struct ath_softc *sc = file->private_data; | 717 | struct ath_softc *sc = file->private_data; |
717 | struct ath_txq *txq; | 718 | struct ath_txq *txq; |
718 | char *buf; | 719 | char *buf; |
719 | unsigned int len = 0, size = 1024; | 720 | unsigned int len = 0; |
721 | const unsigned int size = 1024; | ||
720 | ssize_t retval = 0; | 722 | ssize_t retval = 0; |
721 | int i; | 723 | int i; |
722 | char *qname[4] = {"VO", "VI", "BE", "BK"}; | 724 | static const char *qname[4] = { |
725 | "VO", "VI", "BE", "BK" | ||
726 | }; | ||
723 | 727 | ||
724 | buf = kzalloc(size, GFP_KERNEL); | 728 | buf = kzalloc(size, GFP_KERNEL); |
725 | if (buf == NULL) | 729 | if (buf == NULL) |