Patchwork l2cap_chan_connect() shouldn't be inlined

login
register
mail settings
Submitter Al Viro
Date Feb. 5, 2012, 6:21 a.m.
Message ID <20120205062105.GZ23916@ZenIV.linux.org.uk>
Download mbox | patch
Permalink /patch/139610/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Al Viro - Feb. 5, 2012, 6:21 a.m.
For one thing, it's big.  For another, the only caller is in a different
file anyway...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Marcel Holtmann - Feb. 5, 2012, 7:12 p.m.
Hi Al,

> For one thing, it's big.  For another, the only caller is in a different
> file anyway...
> 
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> 
> diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
> index 68f5891..124f7cf 100644
> --- a/include/net/bluetooth/l2cap.h
> +++ b/include/net/bluetooth/l2cap.h
> @@ -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.

Acked-by: Marcel Holtmann <marcel@holtmann.org>

Regards

Marcel


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Andrei Emeltchenko - Feb. 6, 2012, 8:43 a.m.
Hi all,

On Sun, Feb 05, 2012 at 11:12:10AM -0800, Marcel Holtmann wrote:
> Hi Al,
> 
> > For one thing, it's big.  For another, the only caller is in a different
> > file anyway...
> > 
> > Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> > 
> > diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
> > index 68f5891..124f7cf 100644
> > --- a/include/net/bluetooth/l2cap.h
> > +++ b/include/net/bluetooth/l2cap.h
> > @@ -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.
> 
> Acked-by: Marcel Holtmann <marcel@holtmann.org>

Similar patch has been already applied a month ago to our bluetooth tree

commit 79aa1a3322cfa65199a0d87eacd41bd1fbc33a1d
Author: Johan Hedberg <johan.hedberg@intel.com>
Date:   Sun Jan 8 22:51:16 2012 +0200

Best regards 
Andrei Emeltchenko 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 68f5891..124f7cf 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -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);
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index faf0b11..980abdb 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -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;