[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHLCerOkeOEEUgtJ=YgDKKXDiyFXHQ4LBdzg3-3VtKvpyceqFg@mail.gmail.com>
Date: Thu, 24 Oct 2019 12:56:34 +0530
From: Amit Kucheria <amit.kucheria@...aro.org>
To: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Daniel Lezcano <daniel.lezcano@...aro.org>,
Zhang Rui <rui.zhang@...el.com>,
Eduardo Valentin <edubezval@...il.com>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: linux-next: build warning after merge of the thermal tree
Hi Stephen,
On Tue, Oct 22, 2019 at 4:48 PM Stephen Rothwell <sfr@...b.auug.org.au> wrote:
>
> Hi Amit,
>
> On Tue, 22 Oct 2019 15:20:00 +0530 Amit Kucheria <amit.kucheria@...aro.org> wrote:
> >
> > What compiler version do you use? Any additional flags to make? I'm
> > not seeing this, even with W=1.
>
> $ x86_64-linux-gnu-gcc --version
> x86_64-linux-gnu-gcc (Debian 9.2.1-8) 9.2.1 20190909
>
> No special flags to make.
So this warning only shows up with gcc 9.x. I was using 8.x from my
distro. Will upgrade.
I believe the "fix" is to simply initialize the three variables to
zero (See attached diff). I'll squash that into the patch unless
someone disagrees.
In practice though, we depend on the enum tsens_irq_type irq_type
function parameter to throw a compilation error if we use anything not
defined in the enum. That is also the reason we removed the 'default'
case during review - we should never end up with an undefined value at
runtime.
Regards,
Amit
View attachment "variable_init.patch" of type "text/x-patch" (837 bytes)
Powered by blists - more mailing lists