summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Kaehlcke <mka@chromium.org>2017-04-07 00:21:35 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2017-04-19 17:00:48 +0300
commit627871b71c89a6ec12fbed75063f238e0c7127b2 (patch)
tree6efa2f5c62e84c0dadf672d34ef5b638dba16ced
parent050fd820dc177a77f6f74a152db22fff25a35032 (diff)
downloadlinux-627871b71c89a6ec12fbed75063f238e0c7127b2.tar.xz
ath9k: Add cast to u8 to FREQ2FBIN macro
The macro results are assigned to u8 variables/fields. Adding the cast fixes plenty of clang warnings about "implicit conversion from 'int' to 'u8'". Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/eeprom.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.h b/drivers/net/wireless/ath/ath9k/eeprom.h
index 30bf722e33ed..31390af6c33e 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom.h
+++ b/drivers/net/wireless/ath/ath9k/eeprom.h
@@ -106,7 +106,7 @@
#define AR9285_RDEXT_DEFAULT 0x1F
#define ATH9K_POW_SM(_r, _s) (((_r) & 0x3f) << (_s))
-#define FREQ2FBIN(x, y) ((y) ? ((x) - 2300) : (((x) - 4800) / 5))
+#define FREQ2FBIN(x, y) (u8)((y) ? ((x) - 2300) : (((x) - 4800) / 5))
#define FBIN2FREQ(x, y) ((y) ? (2300 + x) : (4800 + 5 * x))
#define ath9k_hw_use_flash(_ah) (!(_ah->ah_flags & AH_USE_EEPROM))