]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ath9k: Add cast to u8 to FREQ2FBIN macro
authorMatthias Kaehlcke <mka@chromium.org>
Thu, 6 Apr 2017 21:21:35 +0000 (14:21 -0700)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 19 Apr 2017 14:00:48 +0000 (17:00 +0300)
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>
drivers/net/wireless/ath/ath9k/eeprom.h

index 30bf722e33ede0f1a778e45d3a01875e66ff1dcb..31390af6c33e3fd4062f7fe052a25fa420af684f 100644 (file)
 #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))