Netdev List
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: "arnd@kernel.org" <arnd@kernel.org>,
	"sudipm.mukherjee@gmail.com" <sudipm.mukherjee@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"linux-next@vger.kernel.org" <linux-next@vger.kernel.org>,
	"kvalo@kernel.org" <kvalo@kernel.org>,
	"llvm@lists.linux.dev" <llvm@lists.linux.dev>,
	"tony0620emma@gmail.com" <tony0620emma@gmail.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"edumazet@google.com" <edumazet@google.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Gary Chang <gary.chang@realtek.com>,
	"nathan@kernel.org" <nathan@kernel.org>
Subject: Re: build failure of next-20220818 due to 341dd1f7de4c ("wifi: rtw88: add the update channel flow to support setting by parameters")
Date: Thu, 18 Aug 2022 12:58:24 +0000	[thread overview]
Message-ID: <d707e413e8dc3a615b64ca2e8941072f41143184.camel@realtek.com> (raw)
In-Reply-To: <CAK8P3a2_YDCS0Ate7b_nBibsbinjNqvMj9h5foA83NJjq8nE0g@mail.gmail.com>

On Thu, 2022-08-18 at 13:56 +0200, Arnd Bergmann wrote:
> On Thu, Aug 18, 2022 at 1:40 PM Sudip Mukherjee (Codethink)
> <sudipm.mukherjee@gmail.com> wrote:
> > Hi All,
> > 
> > Not sure if it has been reported, clang builds of arm64 allmodconfig have
> > failed to build next-20220818 with the error:
> > 
> > drivers/net/wireless/realtek/rtw88/main.c:731:2: error: variable 'primary_channel_idx' is used
> > uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
> >         default:
> >         ^~~~~~~
> > drivers/net/wireless/realtek/rtw88/main.c:754:39: note: uninitialized use occurs here
> >         hal->current_primary_channel_index = primary_channel_idx;
> >                                              ^~~~~~~~~~~~~~~~~~~
> > 
> > git bisect pointed to 341dd1f7de4c ("wifi: rtw88: add the update channel flow to support setting
> > by parameters").
> > And, reverting that commit has fixed the build failure.
> > 
> > I will be happy to test any patch or provide any extra log if needed.
> 
> Hi Sudeep,
> 
> in my experience, you get the best results by posting a patch instead
> of a bug report
> when you spot a new warning. If you are unsure it's the right fix,
> just state that
> in the description. The maintainers will then either be able to just
> pick it up if
> it looks correct, or be motivated to do a better patch if they don't
> like it. ;-)
> 
> In this case, I think the best fix would be to merged the 'default'
> with the 'case
> RTW_CHANNEL_WIDTH_20' in the switch statement, and use
> RTW_SC_DONT_CARE. Of course, I have no idea if that is the right fix,
> but it would make sense.
> 
> Just try to avoid adding initializations to the variable declaration, as that
> would prevent the compiler from warning if there is a new uninitialized use.
> 

I have sent a patch to fix this: 
https://lore.kernel.org/linux-wireless/20220815062004.22920-1-pkshih@realtek.com/T/#u

Ping-Ke



      parent reply	other threads:[~2022-08-18 12:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18 11:40 build failure of next-20220818 due to 341dd1f7de4c ("wifi: rtw88: add the update channel flow to support setting by parameters") Sudip Mukherjee (Codethink)
2022-08-18 11:56 ` Arnd Bergmann
2022-08-18 11:56   ` Arnd Bergmann
2022-08-18 12:58   ` Ping-Ke Shih [this message]

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=d707e413e8dc3a615b64ca2e8941072f41143184.camel@realtek.com \
    --to=pkshih@realtek.com \
    --cc=arnd@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gary.chang@realtek.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=tony0620emma@gmail.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