rtlwifi: rtl8192c: Fix W=1 warning
authorLarry Finger <Larry.Finger@lwfinger.net>
Fri, 1 Feb 2013 16:40:24 +0000 (10:40 -0600)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 19 Mar 2018 18:58:21 +0000 (18:58 +0000)
commit 8a8e31cc22739d1a5780591c008940292edcde87 upstream.

When this driver is built with "make W=1", the following warning occurs:

drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:907:4: warning: comparison is always false due to limited range of data type [-Wtype-limits]

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c

index ba7ef2f..25f19bb 100644 (file)
@@ -672,7 +672,8 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw
        u8 thermalvalue, delta, delta_lck, delta_iqk;
        long ele_a, ele_d, temp_cck, val_x, value32;
        long val_y, ele_c = 0;
-       u8 ofdm_index[2], cck_index = 0, ofdm_index_old[2], cck_index_old = 0;
+       u8 ofdm_index[2], ofdm_index_old[2], cck_index_old = 0;
+       s8 cck_index = 0;
        int i;
        bool is2t = IS_92C_SERIAL(rtlhal->version);
        s8 txpwr_level[2] = {0, 0};