Skip to content

Commit 09d9673

Browse files
committed
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: alarmtimers: Fix time comparison ptp: Fix clock_getres() implementation
2 parents fb38f9b + c9c024b commit 09d9673

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎drivers/ptp/ptp_clock.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ static s32 scaled_ppm_to_ppb(long ppm)
101101

102102
static int ptp_clock_getres(struct posix_clock *pc, struct timespec *tp)
103103
{
104-
return 1; /* always round timer functions to one nanosecond */
104+
tp->tv_sec = 0;
105+
tp->tv_nsec = 1;
106+
return 0;
105107
}
106108

107109
static int ptp_clock_settime(struct posix_clock *pc, const struct timespec *tp)

‎kernel/time/alarmtimer.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static enum hrtimer_restart alarmtimer_fired(struct hrtimer *timer)
195195
struct alarm *alarm;
196196
ktime_t expired = next->expires;
197197

198-
if (expired.tv64 >= now.tv64)
198+
if (expired.tv64 > now.tv64)
199199
break;
200200

201201
alarm = container_of(next, struct alarm, node);

0 commit comments

Comments
 (0)