From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Benjamin Tissoires
<benjamin.tissoires-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Dmitry Torokhov
<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Jiri Kosina <jkosina-AlSwsSmVLrQ@public.gmane.org>,
Stephane Chatty <chatty-rXV5z7KbLFk@public.gmane.org>,
fabien.andre-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
scott.liu-9cfG7bMpBgR9nmWX13WWKA@public.gmane.org,
Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v1] i2c-hid: introduce HID over i2c specification implementation
Date: Sun, 7 Oct 2012 21:03:59 +0200 [thread overview]
Message-ID: <20121007210359.29f40ecf@endymion.delvare> (raw)
In-Reply-To: <CAN+gG=E3nmXZ9RL3wN2tvKqSOu5hWYLXLf+Z=ag7VvZGJfhQ-w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Sun, 7 Oct 2012 18:57:36 +0200, Benjamin Tissoires wrote:
> On Sun, Oct 7, 2012 at 4:28 PM, Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org> wrote:
> > On Fri, 14 Sep 2012 15:41:43 +0200, benjamin.tissoires wrote:
> >> + u16 readRegister = ihid->hdesc.wDataRegister;
> >
> > This is missing le16_to_cpu().
>
> I agree this is awful, but not putting it allows me to not have to
> check the endianness when I'm using it.
> But I may be totally wrong on this.
I'm afraid I don't follow you. I want to see:
u16 readRegister = le16_to_cpu(ihid->hdesc.wDataRegister);
If you don't do that, your driver is broken on bigendian systems. And
there's no need to "check the endianness when you're using it", the
above should be enough for things to work just fine.
--
Jean Delvare
next prev parent reply other threads:[~2012-10-07 19:03 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-14 13:41 [PATCH v1] i2c-hid: introduce HID over i2c specification implementation benjamin.tissoires
[not found] ` < 20121006220421.47f5fd56@endymion.delvare>
[not found] ` <1347630103-4105-1-git-send-email-benjamin.tissoires-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-10-03 3:08 ` Jian-Jhong Ding
2012-10-03 15:13 ` Benjamin Tissoires
2012-10-03 6:05 ` Shubhrajyoti Datta
[not found] ` <CAM=Q2cuVa9yLY7-nRz26OYktgM3i+dOfDa8vVznwMVrs9pH5sg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-03 15:33 ` Benjamin Tissoires
2012-10-03 16:14 ` Shubhrajyoti Datta
2012-10-03 16:43 ` Dmitry Torokhov
[not found] ` <20121003164306.GA18529-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2012-10-04 9:16 ` Benjamin Tissoires
[not found] ` <CAN+gG=H1BWmA_VW_RrhYWVU7qXrqbzhGCkkY0_41muL=XqJbjA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-04 9:48 ` Jiri Kosina
2012-10-06 19:54 ` Jean Delvare
2012-10-06 20:04 ` Jean Delvare
[not found] ` <20121006220421.47f5fd56-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2012-10-06 20:30 ` Stéphane Chatty
2012-10-06 21:11 ` Jean Delvare
[not found] ` <alpine.LNX.2.00.1210 062314110.27782@pobox.suse.cz>
2012-10-06 21:18 ` Jiri Kosina
2012-10-06 21:28 ` Jiri Kosina
[not found] ` <alpine.LNX.2.00.1210062326150.27782-ztGlSCb7Y1iN3ZZ/Hiejyg@public.gmane.org>
2012-10-06 21:39 ` Stéphane Chatty
[not found] ` <914C6C58-5A3B-4F7D-94BE-EF6868ED5D9D-rXV5z7KbLFk@public.gmane.org>
2012-10-07 16:07 ` Benjamin Tissoires
[not found] ` <CAN+gG=FOnFDn4BdEQUt0dbQRj-6PrhRzSOqM620xSM3DeTXt_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-07 16:20 ` Stéphane Chatty
2012-10-08 14:42 ` Jiri Kosina
2012-10-06 21:27 ` Stéphane Chatty
2012-10-07 7:16 ` Jean Delvare
2012-10-07 16:00 ` Benjamin Tissoires
2012-10-07 14:28 ` Jean Delvare
[not found] ` <20121007162838.01f36b7c-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2012-10-07 16:57 ` Benjamin Tissoires
[not found] ` <CAN+gG=E3nmXZ9RL3wN2tvKqSOu5hWYLXLf+Z=ag7VvZGJfhQ-w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-07 19:03 ` Jean Delvare [this message]
[not found] ` <20121007210359.29f40ecf-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2012-10-15 20:42 ` Benjamin Tissoires
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=20121007210359.29f40ecf@endymion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=benjamin.tissoires-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=chatty-rXV5z7KbLFk@public.gmane.org \
--cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=fabien.andre-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=jkosina-AlSwsSmVLrQ@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=scott.liu-9cfG7bMpBgR9nmWX13WWKA@public.gmane.org \
--cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.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).