l2cap_chan_connect() shouldn't be inlined
Subsystems (4)
PATCH 1/1 l2cap_chan_connect() shouldn't be inlined
For one thing, it's big. For another, the only caller is in a different file anyway...
include/net/bluetooth/l2cap.h +1 -1
@@ -834,7 +834,7 @@ int l2cap_add_scid(struct l2cap_chan *chan, __u16 scid);struct l2cap_chan *l2cap_chan_create (struct sock *sk);void l2cap_chan_close (struct l2cap_chan *chan,int reason);void l2cap_chan_destroy (struct l2cap_chan *chan); -inline int l2cap_chan_connect (struct l2cap_chan *chan,__le16 psm,u16 cid, +int l2cap_chan_connect (struct l2cap_chan *chan,__le16 psm,u16 cid,bdaddr_t *dst);int l2cap_chan_send (struct l2cap_chan *chan,struct msghdr *msg,size_t len,u32 priority);
net/bluetooth/l2cap_core.c +1 -1
@@ -1120,7 +1120,7 @@ static struct l2cap_chan *l2cap_global_chan_by_psm(int state, __le16 psm, bdaddrreturn c1; } -inline int l2cap_chan_connect (struct l2cap_chan *chan,__le16 psm,u16 cid,bdaddr_t *dst) +int l2cap_chan_connect (struct l2cap_chan *chan,__le16 psm,u16 cid,bdaddr_t *dst) {struct sock *sk = chan->sk;bdaddr_t *src = &bt_sk (sk)->src;
A message that is not in the archive (sent off-list or not yet received): 20120205062105.GZ23916-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org
Marcel Holtmann
Acked-byHi Al,
Quoted 10 lines
For one thing, it's big. For another, the only caller is in a different file anyway...
Signed-off-by Al Viro <[email protected]>include/net/bluetooth/l2cap.h +0
-0
include/net/bluetooth/l2cap.h int l2cap_add_scid(struct l2cap_chan *chan, __u16 scid); · line 838
Quoted 6 lines
include/net/bluetooth/l2cap.h +1
-1@@ -834,7 +834,7 @@ int l2cap_add_scid(struct l2cap_chan *chan, __u16 scid);struct l2cap_chan *l2cap_chan_create (struct sock *sk);void l2cap_chan_close (struct l2cap_chan *chan,int reason);void l2cap_chan_destroy (struct l2cap_chan *chan); -inline int l2cap_chan_connect (struct l2cap_chan *chan,__le16 psm,u16 cid, +int l2cap_chan_connect (struct l2cap_chan *chan,__le16 psm,u16 cid,bdaddr_t *dst);
I have no idea on how that happened, but you are fully correct this is pointless.
Regards
Marcel
Hi all,
Quoted 22 lines · Marcel Holtmann
Hi Al,
Quoted 10 lines
For one thing, it's big. For another, the only caller is in a different file anyway...
Signed-off-by Al Viro <[email protected]>include/net/bluetooth/l2cap.h +0
-0include/net/bluetooth/l2cap.h int l2cap_add_scid(struct l2cap_chan *chan, __u16 scid); · line 838
Quoted 6 lines
include/net/bluetooth/l2cap.h +1
-1@@ -834,7 +834,7 @@ int l2cap_add_scid(struct l2cap_chan *chan, __u16 scid);struct l2cap_chan *l2cap_chan_create (struct sock *sk);void l2cap_chan_close (struct l2cap_chan *chan,int reason);void l2cap_chan_destroy (struct l2cap_chan *chan); -inline int l2cap_chan_connect (struct l2cap_chan *chan,__le16 psm,u16 cid, +int l2cap_chan_connect (struct l2cap_chan *chan,__le16 psm,u16 cid,bdaddr_t *dst);I have no idea on how that happened, but you are fully correct this is pointless.
Quoted 1 line
Acked-by Marcel Holtmann <[email protected]>
Similar patch has been already applied a month ago to our bluetooth tree
commit 79aa1a3322cfa65199a0d87eacd41bd1fbc33a1d
Author: Johan Hedberg <[email protected]> Date: Sun Jan 8 22:51:16 2012 +0200
Best regards
Andrei Emeltchenko