Skip to contentSkip to conversation

l2cap_chan_connect() shouldn't be inlined

PATCH In review Al Viro 3 participants 3 messages Feb 5, 2012 – Feb 6, 2012 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore

Al Viro

author
#0 lore raw

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
index 68f5891..124f7cf 100644
@@ -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
index faf0b11..980abdb 100644
@@ -1120,7 +1120,7 @@ static struct l2cap_chan *l2cap_global_chan_by_psm(int state, __le16 psm, bdaddr
 	return 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

#2 lore raw

Hi Al,

Quoted 10 lines

For one thing, it's big. For another, the only caller is in a different file anyway...

include/net/bluetooth/l2cap.h +0 -0
index 68f5891..124f7cf 100644

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

#3 lore raw

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...

include/net/bluetooth/l2cap.h +0 -0
index 68f5891..124f7cf 100644

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.

Quoted 1 line

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