All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH v4] uvcvideo: add a metadata device node
Date: Wed, 26 Jul 2017 14:37:22 +0200	[thread overview]
Message-ID: <61413236-ac5c-474d-5dd4-5fd34f8ffcf8@xs4all.nl> (raw)
In-Reply-To: <Pine.LNX.4.64.1707261316010.6259@axis700.grange>

On 07/26/17 14:29, Guennadi Liakhovetski wrote:
> On Tue, 25 Jul 2017, Guennadi Liakhovetski wrote:
> 
> [snip]
> 
>>>> +struct uvc_meta_buf {
>>>> +	struct timespec ts;
>>>
>>> timespec has a different size on 32-bit and 64-bit architectures, so there
>>> could be issues on 32-bit userspace running on a 64-bit kernel.
>>>
>>> Additionally, on 32-bit platforms, timespec is not year 2038-safe. I thought
>>> that timespec64 was exposed to userspace nowadays, but it doesn't seem to be
>>> the case. I'm not sure how to handle this.
>>
>> Oh, that isn't good :-/ I'll have to think more about this. If you get any 
>> more ideas, I'd be glad to hear them too.
> 
> Shall we just use nanoseconds here too then, as returned by 
> timespec_to_ns(), just like in frame timestamps?

That's what I use and what Arnd recommended for use in public APIs. It's a u64, so easy
to work with.

Don't use timespec/timeval in any new public APIs, that will only cause a mess later.

Regards,

	Hans

  reply	other threads:[~2017-07-26 12:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-07 13:43 [PATCH v4] uvcvideo: add a metadata device node Guennadi Liakhovetski
2017-07-21 18:13 ` Laurent Pinchart
2017-07-25 13:27   ` Guennadi Liakhovetski
2017-07-26 12:29     ` Guennadi Liakhovetski
2017-07-26 12:37       ` Hans Verkuil [this message]
2017-07-28  0:22     ` Laurent Pinchart
2017-07-28  8:59       ` Guennadi Liakhovetski
2017-07-28 10:43         ` Laurent Pinchart

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=61413236-ac5c-474d-5dd4-5fd34f8ffcf8@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=g.liakhovetski@gmx.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.