From: Andrew Morton <akpm@linux-foundation.org>
To: Greg KH <gregkh@suse.de>
Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
phil@hannent.co.uk, mwilder@cs.nmsu.edu
Subject: Re: [PATCH] Input: add mmio xi driver
Date: Wed, 1 Oct 2008 23:12:16 -0700 [thread overview]
Message-ID: <20081001231216.68c7328d.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080925232237.GA22938@suse.de>
> On Thu, 25 Sep 2008 16:22:37 -0700 Greg KH <gregkh@suse.de> wrote:
>
> From: Greg Kroah-Hartman <gregkh@suse.de>
Is this true?
> This patch adds the Mimio Xi interactive whiteboard driver to the tree.
>
> It was originally written by mwilder@cs.nmsu.edu, but cleaned up and
> forward ported by me to the latest kernel version.
Oh. Tricky.
>
> ...
>
> +#define isvalidtxsize(n) ((n) > 0 && (n) <= MIMIO_MAXPAYLOAD)
grumble.
- should be written in C
- buggy when passed expresion-with-side-effects.
>
> ...
>
> +static DECLARE_MUTEX(disconnect_sem);
ooh, a semaphore - I remember them.
checkpatch used to warn about newly-added semaphores but a) it broke and
b) this patch doesn't seem to have met checkpatch.
>
> ...
>
> +static int mimio_greet(struct mimio *mimio)
> +{
> + const struct grtpkt {
> + int nbytes;
> + unsigned delay;
> + char data[8];
> + } grtpkts[] = {
> + { 3, 0, { 0x11, 0x55, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00 } },
> + { 5, 0, { 0x53, 0x55, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00 } },
> + { 5, 0, { 0x43, 0x55, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00 } },
> + { 5, 0, { 0x33, 0x55, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00 } },
> + { 5, 0, { 0x13, 0x00, 0x5e, 0x02, 0x4f, 0x00, 0x00, 0x00 } },
> + { 5, 0, { 0x13, 0x00, 0x04, 0x03, 0x14, 0x00, 0x00, 0x00 } },
> + { 5, 2, { 0x13, 0x00, 0x00, 0x04, 0x17, 0x00, 0x00, 0x00 } },
> + { 5, 0, { 0x13, 0x00, 0x0d, 0x08, 0x16, 0x00, 0x00, 0x00 } },
> + { 5, 0, { 0x13, 0x00, 0x4d, 0x01, 0x5f, 0x00, 0x00, 0x00 } },
> + { 3, 0, { 0xf1, 0x55, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00 } },
> + { 7, 2, { 0x52, 0x55, 0x00, 0x07, 0x31, 0x55, 0x64, 0x00 } },
> + { 0, 0, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } },
> + };
I believe that gcc does the right thing here, but an explict `static' would set
minds at ease.
prev parent reply other threads:[~2008-10-02 6:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-25 23:22 [PATCH] Input: add mmio xi driver Greg KH
[not found] ` <20080925232237.GA22938-l3A5Bk7waGM@public.gmane.org>
2008-09-26 1:20 ` Randy Dunlap
2008-09-26 3:19 ` Greg KH
2008-09-26 10:51 ` Phil Hannent
2008-09-26 17:46 ` Greg KH
[not found] ` <20080926174607.GA700-l3A5Bk7waGM@public.gmane.org>
2008-11-25 4:19 ` mwilder
2008-11-25 9:48 ` Phil Hannent
2008-10-02 6:12 ` Andrew Morton [this message]
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=20081001231216.68c7328d.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@suse.de \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mwilder@cs.nmsu.edu \
--cc=phil@hannent.co.uk \
/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).