Skip to contentSkip to conversation

linux-next: build warning after merge of the pm tree

DISCUSSION Stephen Rothwell 2 participants 2 messages Apr 9, 2018 – Apr 10, 2018 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi Rafael,

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

kernel/time/tick-sched.c: In function 'tick_nohz_idle_exit':
kernel/time/tick-sched.c:1162:3: warning: 'now' may be used uninitialized in this function [-Wmaybe-uninitialized]
__tick_nohz_idle_restart_tick(ts, now);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/time/tick-sched.c:1146:10: note: 'now' was declared here

  ktime_t now;
          ^~~

This appears to be a false positive.

And another in the x86_64 allmodconfig build:

kernel/time/tick-sched.c: In function 'tick_nohz_idle_exit':
kernel/time/tick-sched.c:538:2: warning: 'now' may be used uninitialized in this function [-Wmaybe-uninitialized]
update_ts_time_stats(smp_processor_id(), ts, now, NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/time/tick-sched.c:1146:10: note: 'now' was declared here

  ktime_t now;
          ^~~

also looks like a false positive.

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 29 lines · CEST Stephen Rothwell

--Sig_/QL=OZEguM./+7xhHdQruHaV
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hi Rafael,

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

kernel/time/tick-sched.c: In function 'tick_nohz_idle_exit':
kernel/time/tick-sched.c:1162:3: warning: 'now' may be used uninitialized i= n this function [-Wmaybe-uninitialized]

   __tick_nohz_idle_restart_tick(ts, now);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/time/tick-sched.c:1146:10: note: 'now' was declared here
  ktime_t now;
          ^~~

This appears to be a false positive.

And another in the x86_64 allmodconfig build:

kernel/time/tick-sched.c: In function 'tick_nohz_idle_exit':
kernel/time/tick-sched.c:538:2: warning: 'now' may be used uninitialized in=
this function [-Wmaybe-uninitialized]
update_ts_time_stats(smp_processor_id(), ts, now, NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/time/tick-sched.c:1146:10: note: 'now' was declared here

Quoted 4 lines
  ktime_t now;
          ^~~

also looks like a false positive.

Yes, they are false positives AFAICS.

Cheers,
Rafael