2016-11-13 23:40:13

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the pm tree

Hi Rafael,

After merging the pm tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

drivers/cpufreq/powernv-cpufreq.c: In function 'gpstate_timer_handler':
drivers/cpufreq/powernv-cpufreq.c:642:5: warning: 'lpstate_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (gpstate_idx != gpstates->last_lpstate_idx)
^

Introduced by commit

20b15b766354 ("cpufreq: powernv: Use PMCR to verify global and local pstate")

--
Cheers,
Stephen Rothwell


2016-11-13 23:56:24

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the pm tree

On Monday, November 14, 2016 10:40:09 AM Stephen Rothwell wrote:
> Hi Rafael,

Hi Stephen,

> After merging the pm tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
>
> drivers/cpufreq/powernv-cpufreq.c: In function 'gpstate_timer_handler':
> drivers/cpufreq/powernv-cpufreq.c:642:5: warning: 'lpstate_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
> if (gpstate_idx != gpstates->last_lpstate_idx)
> ^
>
> Introduced by commit
>
> 20b15b766354 ("cpufreq: powernv: Use PMCR to verify global and local pstate")

Thanks for the notice!

Akshay, any thoughts?

Thanks,
Rafael

2016-11-14 08:49:50

by Akshay Adiga

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the pm tree

Hi Rafeal,

Good catch, I need to set lpstate_idx = gpstate_idx.
I will send a patch which fixes this commit.

Thanks Stephen for reporting it. :)

Regards
Akshay Adiga

On 11/14/2016 05:33 AM, Rafael J. Wysocki wrote:
> On Monday, November 14, 2016 10:40:09 AM Stephen Rothwell wrote:
> > Hi Rafael,
>
> Hi Stephen,
>
> > After merging the pm tree, today's linux-next build (powerpc
> > ppc64_defconfig) produced this warning:
> >
> > drivers/cpufreq/powernv-cpufreq.c: In function 'gpstate_timer_handler':
> > drivers/cpufreq/powernv-cpufreq.c:642:5: warning: 'lpstate_idx' may
> be used uninitialized in this function [-Wmaybe-uninitialized]
> > if (gpstate_idx != gpstates->last_lpstate_idx)
> > ^
> >
> > Introduced by commit
> >
> > 20b15b766354 ("cpufreq: powernv: Use PMCR to verify global and
> local pstate")
>
> Thanks for the notice!
>
> Akshay, any thoughts?
>
> Thanks,
> Rafael
>