From: Mat Martineau <mathewm@codeaurora.org>
To: Gustavo Padovan <gustavo@padovan.org>
Cc: linux-bluetooth@vger.kernel.org,
Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Subject: Re: [PATCH -v2 10/12] Bluetooth: Move bt_accept_enqueue() call to l2cap_sock.c
Date: Fri, 25 May 2012 09:18:15 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.02.1205250841550.2070@mathewm-linux> (raw)
In-Reply-To: <1337949064-26187-11-git-send-email-gustavo@padovan.org>
On Fri, 25 May 2012, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>
> bt_accept_enqueue() can be easily placed at the end of
> l2cap_sock_new_connection_cb().
> There is no problem in moving to bt_accept_enqueue() to an earlier point
> in the code, bt_accept_enqueue() only the sk to the it parents queue
> basically.
"only adds the sk to its parent's queue"?
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> ---
> net/bluetooth/l2cap_core.c | 4 ----
> net/bluetooth/l2cap_sock.c | 2 ++
> 2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index e53a8f9..d34d662 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -1165,8 +1165,6 @@ static void l2cap_le_conn_ready(struct l2cap_conn *conn)
> bacpy(&bt_sk(sk)->src, conn->src);
> bacpy(&bt_sk(sk)->dst, conn->dst);
>
> - bt_accept_enqueue(parent, sk);
> -
> l2cap_chan_add(conn, chan);
>
> l2cap_chan_ready(chan);
> @@ -3357,8 +3355,6 @@ static inline int l2cap_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hd
> chan->psm = psm;
> chan->dcid = scid;
>
> - bt_accept_enqueue(parent, sk);
> -
> __l2cap_chan_add(conn, chan);
>
> dcid = chan->scid;
> diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
> index b19366c..27158f2 100644
> --- a/net/bluetooth/l2cap_sock.c
> +++ b/net/bluetooth/l2cap_sock.c
> @@ -914,6 +914,8 @@ static struct l2cap_chan *l2cap_sock_new_connection_cb(void *data)
>
> l2cap_sock_init(sk, parent);
>
> + bt_accept_enqueue(parent, sk);
> +
> return l2cap_pi(sk)->chan;
> }
>
> --
> 1.7.10.1
Other than that, looks good!
--
Mat Martineau
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
next prev parent reply other threads:[~2012-05-25 16:18 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-25 12:30 [PATCH -v2 00/12] Another step in l2cap_core/sock separation Gustavo Padovan
2012-05-25 12:30 ` [PATCH -v2 01/12] Bluetooth: Remove extra l2cap_state_change(BT_CONNECTED) Gustavo Padovan
2012-05-27 4:59 ` Marcel Holtmann
2012-05-25 12:30 ` [PATCH -v2 02/12] Bluetooth: Move clean up code and set of SOCK_ZAPPED to l2cap_sock.c Gustavo Padovan
2012-05-27 5:00 ` Marcel Holtmann
2012-05-28 6:49 ` Andrei Emeltchenko
2012-05-25 12:30 ` [PATCH -v2 03/12] Bluetooth: Add l2cap_chan->ops->ready() Gustavo Padovan
2012-05-27 5:01 ` Marcel Holtmann
2012-05-25 12:30 ` [PATCH -v2 04/12] Bluetooth: Use l2cap_chan_ready() in LE path Gustavo Padovan
2012-05-27 5:02 ` Marcel Holtmann
2012-05-25 12:30 ` [PATCH -v2 05/12] Bluetooth: Use chan->state instead of sk->sk_state Gustavo Padovan
2012-05-27 5:04 ` Marcel Holtmann
2012-05-25 12:30 ` [PATCH -v2 06/12] Bluetooth: Move check for backlog size to l2cap_sock.c Gustavo Padovan
2012-05-25 12:30 ` [PATCH -v2 07/12] Bluetooth: Create DEFER_SETUP flag in conf_state Gustavo Padovan
2012-05-27 5:07 ` Marcel Holtmann
2012-05-27 19:00 ` Gustavo Padovan
2012-05-28 3:48 ` Marcel Holtmann
2012-05-28 16:36 ` Gustavo Padovan
2012-05-25 12:31 ` [PATCH -v2 08/12] Bluetooth: Add chan->ops->defer() Gustavo Padovan
2012-05-27 5:08 ` Marcel Holtmann
2012-05-25 12:31 ` [PATCH -v2 09/12] Bluetooth: check for already existent channel before create new one Gustavo Padovan
2012-05-27 5:09 ` Marcel Holtmann
2012-05-25 12:31 ` [PATCH -v2 10/12] Bluetooth: Move bt_accept_enqueue() call to l2cap_sock.c Gustavo Padovan
2012-05-25 16:18 ` Mat Martineau [this message]
2012-05-25 12:31 ` [PATCH -v2 11/12] Bluetooth: Remove parent socket usage from l2cap_core.c Gustavo Padovan
2012-05-25 12:31 ` [PATCH -v2 12/12] Bluetooth: Used void * as parameter in alloc_skb() Gustavo Padovan
2012-05-25 12:39 ` Andrei Emeltchenko
2012-05-25 12:41 ` Gustavo Padovan
2012-05-27 5:11 ` 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=alpine.DEB.2.02.1205250841550.2070@mathewm-linux \
--to=mathewm@codeaurora.org \
--cc=gustavo.padovan@collabora.co.uk \
--cc=gustavo@padovan.org \
--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