Linux bluetooth development
 help / color / mirror / Atom feed
From: Gustavo Padovan <gustavo@padovan.org>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Subject: Re: [PATCH] Bluetooth: Remove not used struct sock
Date: Wed, 16 Oct 2013 14:14:53 -0300	[thread overview]
Message-ID: <20131016171453.GA2107@joana> (raw)
In-Reply-To: <121AE7E9-6B79-4132-8B59-DEDB1F6EBEE3@holtmann.org>

Hi Marcel,

2013-10-16 Marcel Holtmann <marcel@holtmann.org>:

> Hi Gustavo,
> 
> > It is a leftover from the recent effort of remove sk usage from L2CAP
> > core.
> > 
> > Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> > ---
> > net/bluetooth/l2cap_core.c | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> > index b77e178..2681880 100644
> > --- a/net/bluetooth/l2cap_core.c
> > +++ b/net/bluetooth/l2cap_core.c
> > @@ -3714,7 +3714,7 @@ static struct l2cap_chan *l2cap_connect(struct l2cap_conn *conn,
> > 	struct l2cap_conn_req *req = (struct l2cap_conn_req *) data;
> > 	struct l2cap_conn_rsp rsp;
> > 	struct l2cap_chan *chan = NULL, *pchan;
> > -	struct sock *parent, *sk = NULL;
> > +	struct sock *parent;
> > 	int result, status = L2CAP_CS_NO_INFO;
> > 
> > 	u16 dcid = 0, scid = __le16_to_cpu(req->scid);
> > @@ -3753,8 +3753,6 @@ static struct l2cap_chan *l2cap_connect(struct l2cap_conn *conn,
> > 	if (!chan)
> > 		goto response;
> > 
> > -	sk = chan->sk;
> > -
> 
> can we already do that? I still do not like the chan->data != sk magic check.

Yes, this is just a dead assignment. It is totally safe to remove it.

	Gustavo

      reply	other threads:[~2013-10-16 17:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16 15:39 [PATCH] Bluetooth: Remove not used struct sock Gustavo Padovan
2013-10-16 16:14 ` Marcel Holtmann
2013-10-16 17:14   ` Gustavo Padovan [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=20131016171453.GA2107@joana \
    --to=gustavo@padovan.org \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.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