linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Sang, Oliver" <oliver.sang@intel.com>
To: Tony Chuang <yhchuang@realtek.com>,
	Kalle Valo <kvalo@codeaurora.org>, lkp <lkp@intel.com>
Cc: Andy Huang <tehuang@realtek.com>,
	"kbuild-all@lists.01.org" <kbuild-all@lists.01.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"Sang, Oliver" <oliver.sang@intel.com>
Subject: RE: [kbuild-all] Re: [linux-next:master 2957/8703] drivers/net/wireless/realtek/rtw88/rtw8822c.c:1039:2: warning: missing braces around initializer
Date: Thu, 21 May 2020 12:30:36 +0000	[thread overview]
Message-ID: <F09C421E5D2EBE40AFD7EEA977444DDC4D77F535@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <08fd8d04c2d84d58ac751371cd1c4c1f@realtek.com>

> Kalle Valo <kvalo@codeaurora.org> writes:
> 
> >
> > + linux-wireless
> >
> > kbuild test robot <lkp@intel.com> writes:
> >
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > master
> > > head:   e098d7762d602be640c53565ceca342f81e55ad2
> > > commit: 5ad4d8957b69f3ebf95ac02212c388bda75aeb30 [2957/8703]
> > rtw88:
> > > set power trim according to efuse PG values
> > > config: i386-randconfig-a002-20200514 (attached as .config)
> > > compiler: gcc-4.9 (Ubuntu 4.9.3-13ubuntu2) 4.9.3
> > > reproduce:
> > >         git checkout 5ad4d8957b69f3ebf95ac02212c388bda75aeb30
> > >         # save the attached .config to linux build tree
> > >         make ARCH=i386
> > >
> > > If you fix the issue, kindly add following tag as appropriate
> > > Reported-by: kbuild test robot <lkp@intel.com>
> > >
> > > All warnings (new ones prefixed by >>, old ones prefixed by <<):
> > >
> > > 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]
> >
> > Tony, please check this and fix it. If it's a false warning please let
> > us know.
> >
> 
> I tried to re-pro by:
>          git checkout 5ad4d8957b69f3ebf95ac02212c388bda75aeb30
>          # save the attached .config to linux build tree
>          make ARCH=i386
> 
> But cannot see it. And I checked the code, looks fine to me.
> It seems to be a false warning.

Hi, what's your compiler? we can reproduce by gcc-4.9 and follow above steps.

From https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119 , the warning should be only on old compilers.
If made below change, the warning will disappear.
@@ -1036,7 +1036,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};

Similar fix could be seen, as an example, on https://lkml.org/lkml/2017/9/12/159


> 
> Yen-Hsuan
> _______________________________________________
> kbuild-all mailing list -- kbuild-all@lists.01.org To unsubscribe send an email to
> kbuild-all-leave@lists.01.org

  reply	other threads:[~2020-05-21 12:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <202005141308.j8dUPd66%lkp@intel.com>
2020-05-18 12:24 ` [linux-next:master 2957/8703] drivers/net/wireless/realtek/rtw88/rtw8822c.c:1039:2: warning: missing braces around initializer Kalle Valo
2020-05-19  9:16   ` Tony Chuang
2020-05-21 12:30     ` Sang, Oliver [this message]
2020-05-22  3:49       ` [kbuild-all] " Tony Chuang
2020-05-23 11:31         ` Sang, Oliver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F09C421E5D2EBE40AFD7EEA977444DDC4D77F535@SHSMSX103.ccr.corp.intel.com \
    --to=oliver.sang@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=tehuang@realtek.com \
    --cc=yhchuang@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).