xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: Oleksandr Andrushchenko <andr2000@gmail.com>,
	Stefano Stabellini <sstabellini@kernel.org>
Cc: lars.kurth@citrix.com, vlad.babchuk@gmail.com,
	julien.grall@arm.com, andrii.anisov@gmail.com,
	olekstysh@gmail.com, al1img@gmail.com, JBeulich@suse.com,
	xen-devel@lists.xenproject.org, joculator@gmail.com
Subject: Re: [PATCH 1/2] xen/kbdif: update protocol documentation
Date: Wed, 11 Jan 2017 18:35:27 +0100	[thread overview]
Message-ID: <1484156127.32021.143.camel@citrix.com> (raw)
In-Reply-To: <527e8987-481b-4df0-b329-1f133b260fa4@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1715 bytes --]

On Tue, 2017-01-10 at 09:21 +0200, Oleksandr Andrushchenko wrote:
> On 01/07/2017 12:20 AM, Stefano Stabellini wrote:
> > On Fri, 6 Jan 2017, Oleksandr Andrushchenko wrote:
> > > |                               reserved                         
> > >        |
> > > + * +-----------------+-----------------+-----------------+----
> > > -------------+
> > > + *
> > > |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
> > > /\/\/\/|
> > > + * +-----------------+-----------------+-----------------+----
> > > -------------+
> > I guess this means that we are skipping some bytes because they are
> > all
> > reserved, right?  If so, it would be useful to write the byte count
> > at this
> > point. What's the total size of the event struct?
> > 
> IMO, we shouldn't put any sizes here because:
> 1. Above we say "All event packets have the same
>     length (40 octets)"
> 2. All the event structures are part of the
> union xenkbd_in_event, which has
> char pad[XENKBD_IN_EVENT_SIZE];
> which effectively regulates the size of the event.
> 
In which case, you can use either 40 or XENKBD_IN_EVENT_SIZE (probably
the latter).

It's indeed a repetition, but a good one, IMO: it helps the reader, as
she won't have to go back to figure out how big the struct was, how the
macro was call and to what value it was defined).

Regards,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-01-11 17:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-06  9:32 [PATCH 0/2] xen/kbdif: add multi-touch support Oleksandr Andrushchenko
2017-01-06  9:32 ` [PATCH 1/2] xen/kbdif: update protocol documentation Oleksandr Andrushchenko
2017-01-06 22:20   ` Stefano Stabellini
2017-01-10  7:21     ` Oleksandr Andrushchenko
2017-01-11 17:35       ` Dario Faggioli [this message]
2017-01-11 18:40         ` Oleksandr Andrushchenko
2017-01-11 22:50           ` Dario Faggioli
2017-01-12  6:36             ` Oleksandr Andrushchenko
2017-01-18 19:41               ` Oleksandr Andrushchenko
2017-01-18 20:28                 ` Stefano Stabellini
2017-01-06  9:32 ` [PATCH 2/2] xen/kbdif: add multi-touch support Oleksandr Andrushchenko
2017-01-06 22:37   ` Stefano Stabellini
2017-01-10  7:53     ` Oleksandr Andrushchenko
2017-01-11  0:29       ` Stefano Stabellini
2017-01-11  9:32         ` Oleksandr Andrushchenko
2017-01-19 22:10           ` Stefano Stabellini
2017-01-11  8:01 ` [PATCH 0/2] " Oleksandr Andrushchenko

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=1484156127.32021.143.camel@citrix.com \
    --to=dario.faggioli@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=al1img@gmail.com \
    --cc=andr2000@gmail.com \
    --cc=andrii.anisov@gmail.com \
    --cc=joculator@gmail.com \
    --cc=julien.grall@arm.com \
    --cc=lars.kurth@citrix.com \
    --cc=olekstysh@gmail.com \
    --cc=sstabellini@kernel.org \
    --cc=vlad.babchuk@gmail.com \
    --cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).