rtlwifi: use s8 instead of char
Compiling the rtlwifi drivers for ARM with gcc -Wextra warns about lots of incorrect code that results from 'char' being unsigned here, e.g. realtek/rtlwifi/rc.c:113:18: error: comparison is always true due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8188ee/dm.c:1070:22: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8192ce/trx.c:54:16: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8192cu/mac.c:601:16: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8192de/trx.c:53:16: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8192ee/phy.c:1268:12: error: comparison is always true due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8192se/rf.c:150:20: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8723be/dm.c:877:29: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8723be/phy.c:386:16: error: comparison is always true due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8821ae/dm.c:1514:38: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8821ae/phy.c:1558:11: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8821ae/phy.c:386:24: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/rtl8821ae/trx.c:55:12: error: comparison is always false due to limited range of data type [-Werror=type-limits] realtek/rtlwifi/stats.c:31:16: error: comparison is always false due to limited range of data type [-Werror=type-limits] This patch changes all uses of 'char' in this driver that refer to 8-bit integers to use 's8' instead, which is signed on all architectures. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:

committed by
Kalle Valo

parent
f52b041aed
commit
08aba42fcc
@@ -758,11 +758,11 @@ static void rtl8723be_dm_txpower_tracking_callback_thermalmeter(
|
||||
u8 ofdm_min_index = 6;
|
||||
u8 index_for_channel = 0;
|
||||
|
||||
char delta_swing_table_idx_tup_a[TXSCALE_TABLE_SIZE] = {
|
||||
s8 delta_swing_table_idx_tup_a[TXSCALE_TABLE_SIZE] = {
|
||||
0, 0, 1, 2, 2, 2, 3, 3, 3, 4, 5,
|
||||
5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 10,
|
||||
10, 11, 11, 12, 12, 13, 14, 15};
|
||||
char delta_swing_table_idx_tdown_a[TXSCALE_TABLE_SIZE] = {
|
||||
s8 delta_swing_table_idx_tdown_a[TXSCALE_TABLE_SIZE] = {
|
||||
0, 0, 1, 2, 2, 2, 3, 3, 3, 4, 5,
|
||||
5, 6, 6, 6, 6, 7, 7, 7, 8, 8, 9,
|
||||
9, 10, 10, 11, 12, 13, 14, 15};
|
||||
|
@@ -379,7 +379,7 @@ static void _rtl8723be_phy_store_txpower_by_rate_base(struct ieee80211_hw *hw)
|
||||
static void _phy_convert_txpower_dbm_to_relative_value(u32 *data, u8 start,
|
||||
u8 end, u8 base_val)
|
||||
{
|
||||
char i = 0;
|
||||
s8 i = 0;
|
||||
u8 temp_value = 0;
|
||||
u32 temp_data = 0;
|
||||
|
||||
@@ -953,7 +953,7 @@ static u8 _rtl8723be_get_txpower_by_rate(struct ieee80211_hw *hw,
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct rtl_phy *rtlphy = &rtlpriv->phy;
|
||||
u8 shift = 0, rate_section, tx_num;
|
||||
char tx_pwr_diff = 0;
|
||||
s8 tx_pwr_diff = 0;
|
||||
|
||||
rate_section = _rtl8723be_phy_get_ratesection_intxpower_byrate(rfpath,
|
||||
rate);
|
||||
|
@@ -56,7 +56,7 @@ static void _rtl8723be_query_rxphystatus(struct ieee80211_hw *hw,
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct phy_status_rpt *p_phystrpt = (struct phy_status_rpt *)p_drvinfo;
|
||||
char rx_pwr_all = 0, rx_pwr[4];
|
||||
s8 rx_pwr_all = 0, rx_pwr[4];
|
||||
u8 rf_rx_num = 0, evm, pwdb_all, pwdb_all_bt = 0;
|
||||
u8 i, max_spatial_stream;
|
||||
u32 rssi, total_rssi = 0;
|
||||
|
@@ -385,9 +385,9 @@ struct phy_status_rpt {
|
||||
u8 cck_rpt_b_ofdm_cfosho_b;
|
||||
u8 rsvd_1;/* ch_corr_msb; */
|
||||
u8 noise_power_db_msb;
|
||||
char path_cfotail[2];
|
||||
s8 path_cfotail[2];
|
||||
u8 pcts_mask[2];
|
||||
char stream_rxevm[2];
|
||||
s8 stream_rxevm[2];
|
||||
u8 path_rxsnr[2];
|
||||
u8 noise_power_db_lsb;
|
||||
u8 rsvd_2[3];
|
||||
@@ -422,8 +422,8 @@ struct rx_fwinfo_8723be {
|
||||
u8 pwdb_all;
|
||||
u8 cfosho[4];
|
||||
u8 cfotail[4];
|
||||
char rxevm[2];
|
||||
char rxsnr[2];
|
||||
s8 rxevm[2];
|
||||
s8 rxsnr[2];
|
||||
u8 pcts_msk_rpt[2];
|
||||
u8 pdsnr[2];
|
||||
u8 csi_current[2];
|
||||
|
Reference in New Issue
Block a user