* [PATCH] rtw88: 8822c: fix missing brace warning for old compilers
@ 2020-05-22 3:55 yhchuang
2020-05-28 18:39 ` Sebastian Andrzej Siewior
2020-05-29 17:36 ` Kalle Valo
0 siblings, 2 replies; 4+ messages in thread
From: yhchuang @ 2020-05-22 3:55 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, tehuang, oliver.sang
From: Yan-Hsuan Chuang <yhchuang@realtek.com>
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: 5ad4d8957b69 ("rtw88: set power trim according to efuse PG values")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
---
drivers/net/wireless/realtek/rtw88/rtw8822c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.c b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
index 2cf1c1f0a639..c3d72ef611c6 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
@@ -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)
{
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_5g[2][5] = {{PPG_5GL1_TXA, PPG_5GL2_TXA, PPG_5GM1_TXA,
PPG_5GM2_TXA, PPG_5GH1_TXA},
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] rtw88: 8822c: fix missing brace warning for old compilers
2020-05-22 3:55 [PATCH] rtw88: 8822c: fix missing brace warning for old compilers yhchuang
@ 2020-05-28 18:39 ` Sebastian Andrzej Siewior
2020-05-29 15:18 ` Kalle Valo
2020-05-29 17:36 ` Kalle Valo
1 sibling, 1 reply; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2020-05-28 18:39 UTC (permalink / raw)
To: yhchuang; +Cc: kvalo, linux-wireless, tehuang, oliver.sang
On 2020-05-22 11:55:21 [+0800], yhchuang@realtek.com wrote:
> From: Yan-Hsuan Chuang <yhchuang@realtek.com>
>
> For older versions of gcc, the array = {0}; will cause warnings:
I wouldn't say older. I have here 9.3.0 and it does create the same
warning.
Anyway,
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Sebastian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rtw88: 8822c: fix missing brace warning for old compilers
2020-05-28 18:39 ` Sebastian Andrzej Siewior
@ 2020-05-29 15:18 ` Kalle Valo
0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2020-05-29 15:18 UTC (permalink / raw)
To: Sebastian Andrzej Siewior; +Cc: yhchuang, linux-wireless, tehuang, oliver.sang
Sebastian Andrzej Siewior <bigeasy@linutronix.de> writes:
> On 2020-05-22 11:55:21 [+0800], yhchuang@realtek.com wrote:
>> From: Yan-Hsuan Chuang <yhchuang@realtek.com>
>>
>> For older versions of gcc, the array = {0}; will cause warnings:
>
> I wouldn't say older. I have here 9.3.0 and it does create the same
> warning.
Yeah, and usually it's best to specify the exact compiler version. "old"
and "new" are very relative terms :)
--
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rtw88: 8822c: fix missing brace warning for old compilers
2020-05-22 3:55 [PATCH] rtw88: 8822c: fix missing brace warning for old compilers yhchuang
2020-05-28 18:39 ` Sebastian Andrzej Siewior
@ 2020-05-29 17:36 ` Kalle Valo
1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2020-05-29 17:36 UTC (permalink / raw)
To: yhchuang; +Cc: linux-wireless, tehuang, oliver.sang
<yhchuang@realtek.com> wrote:
> From: Yan-Hsuan Chuang <yhchuang@realtek.com>
>
> 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: 5ad4d8957b69 ("rtw88: set power trim according to efuse PG values")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
> Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Patch applied to wireless-drivers-next.git, thanks.
4e1a341580f2 rtw88: 8822c: fix missing brace warning for old compilers
--
https://patchwork.kernel.org/patch/11564651/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-05-29 17:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22 3:55 [PATCH] rtw88: 8822c: fix missing brace warning for old compilers yhchuang
2020-05-28 18:39 ` Sebastian Andrzej Siewior
2020-05-29 15:18 ` Kalle Valo
2020-05-29 17:36 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.