Commit 4e1a3415 authored by Yan-Hsuan Chuang's avatar Yan-Hsuan Chuang Committed by Kalle Valo

rtw88: 8822c: fix missing brace warning for old compilers

For older versions of gcc, the array = {0}; will cause warnings:

drivers/net/wireless/realtek/rtw88/rtw8822c.c: In function 'rtw8822c_power_trim':
>> drivers/net/wireless/realtek/rtw88/rtw8822c.c:1039:2: warning:
>> missing braces around initializer [-Wmissing-braces]
s8 bb_gain[2][8] = {0};
^
drivers/net/wireless/realtek/rtw88/rtw8822c.c:1039:2: warning: (near
initialization for 'bb_gain[0]') [-Wmissing-braces]

Fixes: 5ad4d895 ("rtw88: set power trim according to efuse PG values")
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarYan-Hsuan Chuang <yhchuang@realtek.com>
Acked-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200522035521.12295-1-yhchuang@realtek.com
parent 7a242fb6
...@@ -1037,7 +1037,7 @@ static void rtw8822c_set_power_trim(struct rtw_dev *rtwdev, s8 bb_gain[2][8]) ...@@ -1037,7 +1037,7 @@ static void rtw8822c_set_power_trim(struct rtw_dev *rtwdev, s8 bb_gain[2][8])
static void rtw8822c_power_trim(struct rtw_dev *rtwdev) static void rtw8822c_power_trim(struct rtw_dev *rtwdev)
{ {
u8 pg_pwr = 0xff, i, path, idx; u8 pg_pwr = 0xff, i, path, idx;
s8 bb_gain[2][8] = {0}; s8 bb_gain[2][8] = {};
u16 rf_efuse_2g[3] = {PPG_2GL_TXAB, PPG_2GM_TXAB, PPG_2GH_TXAB}; u16 rf_efuse_2g[3] = {PPG_2GL_TXAB, PPG_2GM_TXAB, PPG_2GH_TXAB};
u16 rf_efuse_5g[2][5] = {{PPG_5GL1_TXA, PPG_5GL2_TXA, PPG_5GM1_TXA, u16 rf_efuse_5g[2][5] = {{PPG_5GL1_TXA, PPG_5GL2_TXA, PPG_5GM1_TXA,
PPG_5GM2_TXA, PPG_5GH1_TXA}, PPG_5GM2_TXA, PPG_5GH1_TXA},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment