tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
head:   5110c037daf437dbc163be5e9be18c8412a798e6
commit: 5110c037daf437dbc163be5e9be18c8412a798e6 [2/2] alarmtimer: Init 
nanosleep alarm timer on stack
config: i386-randconfig-x013-201812 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout 5110c037daf437dbc163be5e9be18c8412a798e6
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   kernel/time/alarmtimer.c: In function 'alarmtimer_do_nsleep':
>> kernel/time/alarmtimer.c:738:33: error: 'alarm' is a pointer; did you mean 
>> to use '->'?
     destroy_hrtimer_on_stack(&alarm.timer);
                                    ^
                                    ->

vim +738 kernel/time/alarmtimer.c

   714  
   715  /**
   716   * alarmtimer_do_nsleep - Internal alarmtimer nsleep implementation
   717   * @alarm: ptr to alarmtimer
   718   * @absexp: absolute expiration time
   719   *
   720   * Sets the alarm timer and sleeps until it is fired or interrupted.
   721   */
   722  static int alarmtimer_do_nsleep(struct alarm *alarm, ktime_t absexp,
   723                                  enum alarmtimer_type type)
   724  {
   725          struct restart_block *restart;
   726          alarm->data = (void *)current;
   727          do {
   728                  set_current_state(TASK_INTERRUPTIBLE);
   729                  alarm_start(alarm, absexp);
   730                  if (likely(alarm->data))
   731                          schedule();
   732  
   733                  alarm_cancel(alarm);
   734          } while (alarm->data && !signal_pending(current));
   735  
   736          __set_current_state(TASK_RUNNING);
   737  
 > 738          destroy_hrtimer_on_stack(&alarm.timer);
   739  
   740          if (!alarm->data)
   741                  return 0;
   742  
   743          if (freezing(current))
   744                  alarmtimer_freezerset(absexp, type);
   745          restart = &current->restart_block;
   746          if (restart->nanosleep.type != TT_NONE) {
   747                  struct timespec64 rmt;
   748                  ktime_t rem;
   749  
   750                  rem = ktime_sub(absexp, alarm_bases[type].gettime());
   751  
   752                  if (rem <= 0)
   753                          return 0;
   754                  rmt = ktime_to_timespec64(rem);
   755  
   756                  return nanosleep_copyout(restart, &rmt);
   757          }
   758          return -ERESTART_RESTARTBLOCK;
   759  }
   760  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to