Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1225541

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

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [Y2038] [PATCH 1/7] [media] dvb: use ktime_t for internal timeout
Date 2015-09-15 22:40 +0200
Message-ID <q95bb-7Wo-15@gated-at.bofh.it> (permalink)
References <q90Ez-Jd-49@gated-at.bofh.it> <q90Og-UN-43@gated-at.bofh.it> <q92Q1-41y-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/7] [media] y2038 conversion for subsystem Arnd Bergmann <arnd@arndb.de> - 2015-09-15 18:00 +0200
  [PATCH 5/7] [media] use v4l2_get_timestamp where possible Arnd Bergmann <arnd@arndb.de> - 2015-09-15 18:00 +0200
    Re: [PATCH 5/7] [media] use v4l2_get_timestamp where possible Sylwester Nawrocki <s.nawrocki@samsung.com> - 2015-09-16 11:00 +0200
  [PATCH 3/7] [media] dvb: don't use 'time_t' in event ioctl Arnd Bergmann <arnd@arndb.de> - 2015-09-15 18:00 +0200
  [PATCH 7/7] [RFC] [media] introduce v4l2_timespec type for timestamps Arnd Bergmann <arnd@arndb.de> - 2015-09-15 18:00 +0200
    Re: [PATCH 7/7] [RFC] [media] introduce v4l2_timespec type for timestamps Hans Verkuil <hverkuil@xs4all.nl> - 2015-09-15 18:40 +0200
      Re: [Y2038] [PATCH 7/7] [RFC] [media] introduce v4l2_timespec type for timestamps Arnd Bergmann <arnd@arndb.de> - 2015-09-15 22:30 +0200
  [PATCH 6/7] [RFC] [media]: v4l2: introduce v4l2_timeval Arnd Bergmann <arnd@arndb.de> - 2015-09-15 18:00 +0200
    Re: [PATCH 6/7] [RFC] [media]: v4l2: introduce v4l2_timeval Hans Verkuil <hverkuil@xs4all.nl> - 2015-09-15 18:30 +0200
      Re: [PATCH 6/7] [RFC] [media]: v4l2: introduce v4l2_timeval Arnd Bergmann <arnd@arndb.de> - 2015-09-15 22:30 +0200
        Re: [PATCH 6/7] [RFC] [media]: v4l2: introduce v4l2_timeval Hans Verkuil <hverkuil@xs4all.nl> - 2015-09-16 09:00 +0200
          Re: [PATCH 6/7] [RFC] [media]: v4l2: introduce v4l2_timeval Arnd Bergmann <arnd@arndb.de> - 2015-09-16 10:00 +0200
            Re: [PATCH 6/7] [RFC] [media]: v4l2: introduce v4l2_timeval Hans Verkuil <hverkuil@xs4all.nl> - 2015-09-16 10:20 +0200
              Re: [PATCH 6/7] [RFC] [media]: v4l2: introduce v4l2_timeval Arnd Bergmann <arnd@arndb.de> - 2015-09-16 10:50 +0200
  [PATCH 1/7] [media] dvb: use ktime_t for internal timeout Arnd Bergmann <arnd@arndb.de> - 2015-09-15 18:00 +0200
    Re: [PATCH 1/7] [media] dvb: use ktime_t for internal timeout Andreas Oberritter <obi@saftware.de> - 2015-09-15 20:10 +0200
      Re: [Y2038] [PATCH 1/7] [media] dvb: use ktime_t for internal timeout Arnd Bergmann <arnd@arndb.de> - 2015-09-15 22:40 +0200
  [PATCH 2/7] [media] dvb: remove unused systime() function Arnd Bergmann <arnd@arndb.de> - 2015-09-15 18:00 +0200

csiph-web