From: Marcel Holtmann <marcel@holtmann.org>
To: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCHv2 3/6] Bluetooth: Correct CID endian notation
Date: Mon, 12 Mar 2012 10:45:55 -0700 [thread overview]
Message-ID: <1331574355.14217.89.camel@aeonflux> (raw)
In-Reply-To: <1331547191-15307-4-git-send-email-Andrei.Emeltchenko.news@gmail.com>
Hi Andrei,
> L2CAP channel id is used in host format in internal L2CAP code.
> Fix sparse warnings about wrong endian conversion.
>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> ---
> net/bluetooth/l2cap_core.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index 85c3404..c778585 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -834,7 +834,7 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
> /* Find socket with cid and source bdaddr.
> * Returns closest match, locked.
> */
> -static struct l2cap_chan *l2cap_global_chan_by_scid(int state, __le16 cid, bdaddr_t *src)
> +static struct l2cap_chan *l2cap_global_chan_by_scid(int state, u16 cid, bdaddr_t *src)
I get the feeling we are turning in circles here. Can you please have a
second look that all the conversions are now correct.
And yes, we wanna store the CID in host endian, while it is provided in
little endian by userspace.
Regards
Marcel
next prev parent reply other threads:[~2012-03-12 17:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-12 10:13 [PATCHv2 0/6] Endian bugfixes Andrei Emeltchenko
2012-03-12 10:13 ` [PATCHv2 1/6] Bluetooth: Correct ediv in SMP Andrei Emeltchenko
2012-03-12 17:44 ` Marcel Holtmann
2012-03-16 15:34 ` Johan Hedberg
2012-03-12 10:13 ` [PATCHv2 2/6] Bluetooth: Correct length calc in L2CAP conf rsp Andrei Emeltchenko
2012-03-12 17:43 ` Marcel Holtmann
2012-03-12 10:13 ` [PATCHv2 3/6] Bluetooth: Correct CID endian notation Andrei Emeltchenko
2012-03-12 17:45 ` Marcel Holtmann [this message]
2012-03-12 10:13 ` [PATCHv2 4/6] Bluetooth: Convert error codes to le16 Andrei Emeltchenko
2012-03-12 17:46 ` Marcel Holtmann
2012-03-12 10:13 ` [PATCHv2 5/6] Bluetooth: trivial: Fix endian conversion mode Andrei Emeltchenko
2012-03-12 17:47 ` Marcel Holtmann
2012-03-12 10:13 ` [PATCHv2 6/6] Bluetooth: mgmt: Add missing endian conversion Andrei Emeltchenko
2012-03-12 17:47 ` Marcel Holtmann
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=1331574355.14217.89.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=Andrei.Emeltchenko.news@gmail.com \
--cc=linux-bluetooth@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox