This patch fixes a noisy warning triggered by -Wenum-compare

|main.c:1390:31: warning: comparison between ‘enum nl80211_ac’
|       and ‘enum ar9170_txq’ [-Wenum-compare]
|  BUILD_BUG_ON(NL80211_NUM_ACS > __AR9170_NUM_TXQ);
|                               ^
| [...]

This is a little bit unfortunate, since the number of queues
(hence NL80211_NUM_ACS) is a constant based on the IEEE 802.11
(much like IEEE80211_NUM_ACS) and __AR9170_NUM_TXQ is more or
less defined by the AR9170 hardware.

Signed-off-by: Christian Lamparter <[email protected]>
---
 drivers/net/wireless/ath/carl9170/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/carl9170/main.c 
b/drivers/net/wireless/ath/carl9170/main.c
index eaea08581cea..acc881bd7f9f 100644
--- a/drivers/net/wireless/ath/carl9170/main.c
+++ b/drivers/net/wireless/ath/carl9170/main.c
@@ -1387,7 +1387,7 @@ static int carl9170_op_conf_tx(struct ieee80211_hw *hw,
        int ret;
 
        BUILD_BUG_ON(ARRAY_SIZE(ar9170_qmap) != __AR9170_NUM_TXQ);
-       BUILD_BUG_ON(NL80211_NUM_ACS > __AR9170_NUM_TXQ);
+       BUILD_BUG_ON((size_t)NL80211_NUM_ACS > (size_t)__AR9170_NUM_TXQ);
        mutex_lock(&ar->mutex);
        memcpy(&ar->edcf[ar9170_qmap[queue]], param, sizeof(*param));
        ret = carl9170_set_qos(ar);
-- 
2.20.1

Reply via email to