linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Gustavo Padovan <gustavo@padovan.org>
Cc: linux-bluetooth@vger.kernel.org,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Subject: Re: [PATCH -v2 2/8] Bluetooth: Move bt_accept_enqueue() to l2cap_sock.c
Date: Thu, 11 Oct 2012 15:44:38 +0200	[thread overview]
Message-ID: <1349963078.27233.166.camel@aeonflux> (raw)
In-Reply-To: <1349938311-25101-2-git-send-email-gustavo@padovan.org>

Hi Gustavo,

> This is move the parent socket usage to l2cap_sock.c
> 
> 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 b382631..e10a1a3 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -1233,8 +1233,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);
> @@ -3451,8 +3449,6 @@ static inline int l2cap_connect_req(struct l2cap_conn *conn,
>  	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 f95fc7e..d5093b8 100644
> --- a/net/bluetooth/l2cap_sock.c
> +++ b/net/bluetooth/l2cap_sock.c
> @@ -949,6 +949,8 @@ static struct l2cap_chan *l2cap_sock_new_connection_cb(struct l2cap_chan *chan)
>  
>  	l2cap_sock_init(sk, parent);
>  
> +	bt_accept_enqueue(parent, sk);
> +
>  	return l2cap_pi(sk)->chan;
>  }
>  

and this has no side effect with adding during this window. Your commit
message is not really explaining why this is fine. Please fix that.

Regards

Marcel



  reply	other threads:[~2012-10-11 13:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-11  6:51 [PATCH -v2 1/8] Bluetooth: Fix L2CAP coding style Gustavo Padovan
2012-10-11  6:51 ` [PATCH -v2 2/8] Bluetooth: Move bt_accept_enqueue() to l2cap_sock.c Gustavo Padovan
2012-10-11 13:44   ` Marcel Holtmann [this message]
2012-10-12 11:13     ` Gustavo Padovan
2012-10-11  6:51 ` [PATCH -v2 3/8] Bluetooth: Remove parent socket usage from l2cap_core.c Gustavo Padovan
2012-10-11 13:45   ` Marcel Holtmann
2012-10-11  6:51 ` [PATCH -v2 4/8] Bluetooth: Add chan->ops->defer() Gustavo Padovan
2012-10-11 13:49   ` Marcel Holtmann
2012-10-12 10:48     ` Gustavo Padovan
2012-10-11  6:51 ` [PATCH -v2 5/8] Bluetooth: Remove GFP_ATOMIC usage from l2cap_core.c Gustavo Padovan
2012-10-11 13:50   ` Marcel Holtmann
2012-10-12 10:20     ` Gustavo Padovan
2012-10-11  6:51 ` [PATCH -v2 6/8] Bluetooth: use l2cap_chan_set_err() Gustavo Padovan
2012-10-11 13:51   ` Marcel Holtmann
2012-10-11  6:51 ` [PATCH -v2 7/8] Bluetooth: Use locked l2cap_state_change() Gustavo Padovan
2012-10-11 13:52   ` Marcel Holtmann
2012-10-11  6:51 ` [PATCH -v2 8/8] Bluetooth: Call ops->teardown() without checking for NULL Gustavo Padovan
2012-10-11 13:52   ` Marcel Holtmann
2012-10-11 13:43 ` [PATCH -v2 1/8] Bluetooth: Fix L2CAP coding style Marcel Holtmann
2012-10-12 11:16 ` Andrei Emeltchenko

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=1349963078.27233.166.camel@aeonflux \
    --to=marcel@holtmann.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;
as well as URLs for NNTP newsgroup(s).