@@ -55,7 +55,7 @@ static inline bool isalarm(struct timerfd_ctx *ctx)
5555/*
5656 * This gets called when the timer event triggers. We set the "expired"
5757 * flag, but we do not re-arm the timer (in case it's necessary,
58- * tintv.tv64 != 0) until the timer is accessed.
58+ * tintv != 0) until the timer is accessed.
5959 */
6060static void timerfd_triggered (struct timerfd_ctx * ctx )
6161{
@@ -93,7 +93,7 @@ static enum alarmtimer_restart timerfd_alarmproc(struct alarm *alarm,
9393 */
9494void timerfd_clock_was_set (void )
9595{
96- ktime_t moffs = ktime_mono_to_real (( ktime_t ){ . tv64 = 0 } );
96+ ktime_t moffs = ktime_mono_to_real (0 );
9797 struct timerfd_ctx * ctx ;
9898 unsigned long flags ;
9999
@@ -102,8 +102,8 @@ void timerfd_clock_was_set(void)
102102 if (!ctx -> might_cancel )
103103 continue ;
104104 spin_lock_irqsave (& ctx -> wqh .lock , flags );
105- if (ctx -> moffs . tv64 != moffs . tv64 ) {
106- ctx -> moffs . tv64 = KTIME_MAX ;
105+ if (ctx -> moffs != moffs ) {
106+ ctx -> moffs = KTIME_MAX ;
107107 ctx -> ticks ++ ;
108108 wake_up_locked (& ctx -> wqh );
109109 }
@@ -124,9 +124,9 @@ static void timerfd_remove_cancel(struct timerfd_ctx *ctx)
124124
125125static bool timerfd_canceled (struct timerfd_ctx * ctx )
126126{
127- if (!ctx -> might_cancel || ctx -> moffs . tv64 != KTIME_MAX )
127+ if (!ctx -> might_cancel || ctx -> moffs != KTIME_MAX )
128128 return false;
129- ctx -> moffs = ktime_mono_to_real (( ktime_t ){ . tv64 = 0 } );
129+ ctx -> moffs = ktime_mono_to_real (0 );
130130 return true;
131131}
132132
@@ -155,7 +155,7 @@ static ktime_t timerfd_get_remaining(struct timerfd_ctx *ctx)
155155 else
156156 remaining = hrtimer_expires_remaining_adjusted (& ctx -> t .tmr );
157157
158- return remaining . tv64 < 0 ? ktime_set (0 , 0 ): remaining ;
158+ return remaining < 0 ? ktime_set (0 , 0 ): remaining ;
159159}
160160
161161static int timerfd_setup (struct timerfd_ctx * ctx , int flags ,
@@ -184,7 +184,7 @@ static int timerfd_setup(struct timerfd_ctx *ctx, int flags,
184184 ctx -> t .tmr .function = timerfd_tmrproc ;
185185 }
186186
187- if (texp . tv64 != 0 ) {
187+ if (texp != 0 ) {
188188 if (isalarm (ctx )) {
189189 if (flags & TFD_TIMER_ABSTIME )
190190 alarm_start (& ctx -> t .alarm , texp );
@@ -261,9 +261,9 @@ static ssize_t timerfd_read(struct file *file, char __user *buf, size_t count,
261261 if (ctx -> ticks ) {
262262 ticks = ctx -> ticks ;
263263
264- if (ctx -> expired && ctx -> tintv . tv64 ) {
264+ if (ctx -> expired && ctx -> tintv ) {
265265 /*
266- * If tintv.tv64 != 0, this is a periodic timer that
266+ * If tintv != 0, this is a periodic timer that
267267 * needs to be re-armed. We avoid doing it in the timer
268268 * callback to avoid DoS attacks specifying a very
269269 * short timer period.
@@ -410,7 +410,7 @@ SYSCALL_DEFINE2(timerfd_create, int, clockid, int, flags)
410410 else
411411 hrtimer_init (& ctx -> t .tmr , clockid , HRTIMER_MODE_ABS );
412412
413- ctx -> moffs = ktime_mono_to_real (( ktime_t ){ . tv64 = 0 } );
413+ ctx -> moffs = ktime_mono_to_real (0 );
414414
415415 ufd = anon_inode_getfd ("[timerfd]" , & timerfd_fops , ctx ,
416416 O_RDWR | (flags & TFD_SHARED_FCNTL_FLAGS ));
@@ -469,7 +469,7 @@ static int do_timerfd_settime(int ufd, int flags,
469469 * We do not update "ticks" and "expired" since the timer will be
470470 * re-programmed again in the following timerfd_setup() call.
471471 */
472- if (ctx -> expired && ctx -> tintv . tv64 ) {
472+ if (ctx -> expired && ctx -> tintv ) {
473473 if (isalarm (ctx ))
474474 alarm_forward_now (& ctx -> t .alarm , ctx -> tintv );
475475 else
@@ -499,7 +499,7 @@ static int do_timerfd_gettime(int ufd, struct itimerspec *t)
499499 ctx = f .file -> private_data ;
500500
501501 spin_lock_irq (& ctx -> wqh .lock );
502- if (ctx -> expired && ctx -> tintv . tv64 ) {
502+ if (ctx -> expired && ctx -> tintv ) {
503503 ctx -> expired = 0 ;
504504
505505 if (isalarm (ctx )) {
0 commit comments