Re: [Y2038] [PATCH 1/7] [media] dvb: use ktime_t for internal timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 15 September 2015 19:55:35 Andreas Oberritter wrote:

> >  		/* show speed every SPEED_PKTS_INTERVAL packets */
> >  		if (!(demux->speed_pkts_cnt % SPEED_PKTS_INTERVAL)) {
> > -			cur_time = current_kernel_time();
> > +			cur_time = ktime_get();
> >  
> > -			if (demux->speed_last_time.tv_sec != 0 &&
> > -					demux->speed_last_time.tv_nsec != 0) {
> > -				delta_time = timespec_sub(cur_time,
> > -						demux->speed_last_time);
> > +			if (ktime_to_ns(demux->speed_last_time) == 0) {
> 
> if ktime_to_ns does what I think it does, then you should invert the logic.

Thanks for taking a critical look here, you are absolutely right, and I've
now fixed it.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux