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


Groups > linux.kernel > #1607151

Re: [PATCH] Documentation: Input: Add uinput documentation

Path csiph.com!xmission!3.us.feeder.erje.net!2.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From Peter Hutterer <peter.hutterer@who-t.net>
Newsgroups linux.kernel
Subject Re: [PATCH] Documentation: Input: Add uinput documentation
Date Thu, 23 Mar 2017 04:30:01 +0100
Message-ID <to1BL-4IG-3@gated-at.bofh.it> (permalink)
References <tnEOS-4iL-11@gated-at.bofh.it> <tnEOS-4iL-9@gated-at.bofh.it> <tnFKV-53p-5@gated-at.bofh.it> <to18K-49M-17@gated-at.bofh.it>
X-Original-To Marcos Paulo de Souza <marcos.souza.org@gmail.com>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.7.1 (2016-10-04)
X-Greylist Sender passed SPF test, not delayed by milter-greylist-4.4.3 (mail.clearchain.com [127.0.0.1]); Thu, 23 Mar 2017 13:54:51 +1030 (CST)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 44
Organization linux.* mail to news gateway
X-Original-Cc corbet@lwn.net, linux-doc@vger.kernel.org, dmitry.torokhov@gmail.com, linux-input@vger.kernel.org, benjamin.tissoires@redhat.com, linux-kernel@vger.kernel.org
X-Original-Date Thu, 23 Mar 2017 13:23:56 +1000
X-Original-Message-ID <20170323032356.GA10860@jelly>
X-Original-References <20170322025820.4108-1-marcos.souza.org@gmail.com> <20170322025820.4108-2-marcos.souza.org@gmail.com> <20170322040331.GA7293@jelly> <20170323025446.GA10447@xfiles>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1607151

Show key headers only | View raw


On Wed, Mar 22, 2017 at 11:54:48PM -0300, Marcos Paulo de Souza wrote:
> Hi Peter,
> 
> first of all, thanks a lot for reading this patch so quickly and to
> point a lot of things to make this doc way better.
> 
> See some notes below.

thanks for all the fixes, much appreciated.
just two comments below:

> On Wed, Mar 22, 2017 at 02:03:31PM +1000, Peter Hutterer wrote:
[...]
> > > +        memset(&ie, 0, sizeof(ie));
> > > +        ie.type = type;
> > > +        ie.code = code;
> > > +        ie.value = val;
> > > +
> > 
> > memset followed by three out of five filled in seems strange. Just add
> >       ie.time.tv_sec = 0;
> >       ie.time.tv_usec = 0;
> > 
> > ideally, with a comment that states that the timestamp is ignored :)
> 
> All the code in this doc is the result of my tests using uinput, so
> somethings were set in my code some time ago and were never touched
> again. Yes, this makes things a way better :)

note that if we ship this as documentation, these become the official
examples so they *have* to be correct. How many times have you copied
something from the examples of a library? Not ideal if there's a bug or just
messy code to begin with :)

> I fixed a lot of things today, the things that are still missing are the
> libevdev example, and the version check. I do think that I can send a
> new version tomorrow.

As for libevdev: just add a link to the documentation, don't add a libevdev
example. libevdev should (and does) provide the examples and you don't want
to ship example code that relies on some other library' API.

Cheers,
   Peter

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


Thread

[PATCH] Documentation: Input: Add uinput documentation Marcos Paulo de Souza <marcos.souza.org@gmail.com> - 2017-03-22 04:10 +0100
  Re: [PATCH] Documentation: Input: Add uinput documentation Peter Hutterer <peter.hutterer@who-t.net> - 2017-03-22 05:10 +0100
    Re: [PATCH] Documentation: Input: Add uinput documentation Marcos Paulo de Souza <marcos.souza.org@gmail.com> - 2017-03-23 04:00 +0100
      Re: [PATCH] Documentation: Input: Add uinput documentation Peter Hutterer <peter.hutterer@who-t.net> - 2017-03-23 04:30 +0100
        Re: [PATCH] Documentation: Input: Add uinput documentation Marcos Paulo de Souza <marcos.souza.org@gmail.com> - 2017-03-23 12:40 +0100

csiph-web