Linux Media Controller development
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: y2038@lists.linaro.org
Cc: Andreas Oberritter <obi@saftware.de>,
	linux-media@vger.kernel.org, linux-api@vger.kernel.org,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Subject: Re: [Y2038] [PATCH 1/7] [media] dvb: use ktime_t for internal timeout
Date: Tue, 15 Sep 2015 22:30 +0200	[thread overview]
Message-ID: <48082122.rhhMXK7OaH@wuerfel> (raw)
In-Reply-To: <55F85B97.8000700@saftware.de>

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

  reply	other threads:[~2015-09-15 20:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-15 15:49 [PATCH 0/7] [media] y2038 conversion for subsystem Arnd Bergmann
2015-09-15 15:49 ` [PATCH 1/7] [media] dvb: use ktime_t for internal timeout Arnd Bergmann
2015-09-15 17:55   ` Andreas Oberritter
2015-09-15 20:30     ` Arnd Bergmann [this message]
2015-09-15 15:49 ` [PATCH 2/7] [media] dvb: remove unused systime() function Arnd Bergmann
2015-09-15 15:49 ` [PATCH 3/7] [media] dvb: don't use 'time_t' in event ioctl Arnd Bergmann
2017-08-28 15:32   ` [3/7,media] " Eugene Syromiatnikov
2017-08-30 20:25     ` Arnd Bergmann
2017-08-31 13:10       ` Eugene Syromiatnikov
2015-09-15 15:49 ` [PATCH 4/7] [media] exynos4-is: use monotonic timestamps as advertized Arnd Bergmann
2015-09-16  8:55   ` Sylwester Nawrocki
2015-09-15 15:49 ` [PATCH 5/7] [media] use v4l2_get_timestamp where possible Arnd Bergmann
2015-09-16  8:57   ` Sylwester Nawrocki
2015-09-15 15:49 ` [PATCH 6/7] [RFC] [media]: v4l2: introduce v4l2_timeval Arnd Bergmann
2015-09-15 16:27   ` Hans Verkuil
2015-09-15 20:26     ` Arnd Bergmann
2015-09-16  6:51       ` Hans Verkuil
2015-09-16  7:56         ` Arnd Bergmann
2015-09-16  8:12           ` Hans Verkuil
2015-09-16  8:40             ` Arnd Bergmann
2015-09-15 15:49 ` [PATCH 7/7] [RFC] [media] introduce v4l2_timespec type for timestamps Arnd Bergmann
2015-09-15 16:32   ` Hans Verkuil
2015-09-15 20:27     ` [Y2038] " Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48082122.rhhMXK7OaH@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=obi@saftware.de \
    --cc=y2038@lists.linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox