* [PATCH] Bluetooth: Remove not used struct sock
@ 2013-10-16 15:39 Gustavo Padovan
2013-10-16 16:14 ` Marcel Holtmann
0 siblings, 1 reply; 3+ messages in thread
From: Gustavo Padovan @ 2013-10-16 15:39 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Gustavo Padovan
From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
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;
-
/* For certain devices (ex: HID mouse), support for authentication,
* pairing and bonding is optional. For such devices, inorder to avoid
* the ACL alive for too long after L2CAP disconnection, reset the ACL
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: Remove not used struct sock
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
0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2013-10-16 16:14 UTC (permalink / raw)
To: Gustavo Padovan; +Cc: linux-bluetooth, Gustavo Padovan
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.
Regards
Marcel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: Remove not used struct sock
2013-10-16 16:14 ` Marcel Holtmann
@ 2013-10-16 17:14 ` Gustavo Padovan
0 siblings, 0 replies; 3+ messages in thread
From: Gustavo Padovan @ 2013-10-16 17:14 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth, Gustavo Padovan
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-16 17:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox