* [PATCH] blutetooth: Remove bogus inline for l2cap_chan_connect() @ 2012-01-15 10:07 Geert Uytterhoeven [not found] ` <1326622076-957-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Geert Uytterhoeven @ 2012-01-15 10:07 UTC (permalink / raw) To: Gustavo F. Padovan, Marcel Holtmann, David S. Miller Cc: linux-bluetooth-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven commit 03a001948166d966d0d580cddb8ae3a23f8b795b ("Bluetooth: invert locking order in connect path") marked l2cap_chan_connect() inline for both the prototype in include/net/bluetooth/l2cap.h and the implementation in net/bluetooth/l2cap_core.c. As the former doesn't contain an implementation, net/bluetooth/l2cap_sock.c now fails to build, e.g. for m68k allmodconfig: net/bluetooth/l2cap_sock.c: In function ‘l2cap_sock_connect’: include/net/bluetooth/l2cap.h:838: sorry, unimplemented: inlining failed in call to ‘l2cap_chan_connect’: function body not available net/bluetooth/l2cap_sock.c:126: sorry, unimplemented: called from here make[1]: *** [net/bluetooth/l2cap_sock.o] Error 1 As l2cap_chan_connect() is not that small and also called from net/bluetooth/l2cap_sock.c, I removed both inline keywords. Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> -- As I can't seem to find anyone else getting this, I guess it's only triggered by some versions of gcc. Mine is gcc version 4.1.2 20061115 (prerelease) (Ubuntu 4.1.1-21) --- include/net/bluetooth/l2cap.h | 2 +- net/bluetooth/l2cap_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <1326622076-957-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>]
* Re: [PATCH] blutetooth: Remove bogus inline for l2cap_chan_connect() [not found] ` <1326622076-957-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> @ 2012-01-15 10:52 ` Johan Hedberg 2012-01-15 11:25 ` Geert Uytterhoeven 0 siblings, 1 reply; 4+ messages in thread From: Johan Hedberg @ 2012-01-15 10:52 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Gustavo F. Padovan, Marcel Holtmann, David S. Miller, linux-bluetooth-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA Hi Geert, On Sun, Jan 15, 2012, Geert Uytterhoeven wrote: > commit 03a001948166d966d0d580cddb8ae3a23f8b795b ("Bluetooth: invert locking > order in connect path") marked l2cap_chan_connect() inline for both the > prototype in include/net/bluetooth/l2cap.h and the implementation in > net/bluetooth/l2cap_core.c. > > As the former doesn't contain an implementation, net/bluetooth/l2cap_sock.c > now fails to build, e.g. for m68k allmodconfig: > > net/bluetooth/l2cap_sock.c: In function ‘l2cap_sock_connect’: > include/net/bluetooth/l2cap.h:838: sorry, unimplemented: inlining failed in call to ‘l2cap_chan_connect’: function body not available > net/bluetooth/l2cap_sock.c:126: sorry, unimplemented: called from here > make[1]: *** [net/bluetooth/l2cap_sock.o] Error 1 > > As l2cap_chan_connect() is not that small and also called from > net/bluetooth/l2cap_sock.c, I removed both inline keywords. > > Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> > -- > As I can't seem to find anyone else getting this, I guess it's only > triggered by some versions of gcc. Mine is > > gcc version 4.1.2 20061115 (prerelease) (Ubuntu 4.1.1-21) > --- > include/net/bluetooth/l2cap.h | 2 +- > net/bluetooth/l2cap_core.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) This was already reported[1] earlier this month and a patch[2] was also created for it which right now resides in my bluetooth-next tree[3]. Johan [1] http://www.spinics.net/lists/linux-bluetooth/msg19851.html [2] http://www.spinics.net/lists/linux-bluetooth/msg20009.html [3] http://git.kernel.org/?p=linux/kernel/git/jh/bluetooth-next.git;a=commitdiff;h=cd555072d0b0738c8a107776fe91902da686f94d ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] blutetooth: Remove bogus inline for l2cap_chan_connect() 2012-01-15 10:52 ` Johan Hedberg @ 2012-01-15 11:25 ` Geert Uytterhoeven 2012-02-06 10:41 ` Geert Uytterhoeven 0 siblings, 1 reply; 4+ messages in thread From: Geert Uytterhoeven @ 2012-01-15 11:25 UTC (permalink / raw) To: Geert Uytterhoeven, Gustavo F. Padovan, Marcel Holtmann, David S. Miller, linux-bluetooth, netdev, linux-kernel Hi Johan, On Sun, Jan 15, 2012 at 11:52, Johan Hedberg <johan.hedberg@gmail.com> wrote: >> net/bluetooth/l2cap_sock.c: In function ‘l2cap_sock_connect’: >> include/net/bluetooth/l2cap.h:838: sorry, unimplemented: inlining failed in call to ‘l2cap_chan_connect’: function body not available >> net/bluetooth/l2cap_sock.c:126: sorry, unimplemented: called from here >> make[1]: *** [net/bluetooth/l2cap_sock.o] Error 1 > This was already reported[1] earlier this month and a patch[2] was also Ah, it was reported as a sparse warning. I guess that's why I didn't find it. But a build error is worse. > created for it which right now resides in my bluetooth-next tree[3]. OK, thanks a lot! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] blutetooth: Remove bogus inline for l2cap_chan_connect() 2012-01-15 11:25 ` Geert Uytterhoeven @ 2012-02-06 10:41 ` Geert Uytterhoeven 0 siblings, 0 replies; 4+ messages in thread From: Geert Uytterhoeven @ 2012-02-06 10:41 UTC (permalink / raw) To: Geert Uytterhoeven, Gustavo F. Padovan, Marcel Holtmann, David S. Miller, linux-bluetooth, netdev, linux-kernel Hi Johan, On Sun, Jan 15, 2012 at 12:25, Geert Uytterhoeven <geert@linux-m68k.org> wrote: > On Sun, Jan 15, 2012 at 11:52, Johan Hedberg <johan.hedberg@gmail.com> wrote: >>> net/bluetooth/l2cap_sock.c: In function ‘l2cap_sock_connect’: >>> include/net/bluetooth/l2cap.h:838: sorry, unimplemented: inlining failed in call to ‘l2cap_chan_connect’: function body not available >>> net/bluetooth/l2cap_sock.c:126: sorry, unimplemented: called from here >>> make[1]: *** [net/bluetooth/l2cap_sock.o] Error 1 > >> This was already reported[1] earlier this month and a patch[2] was also > > Ah, it was reported as a sparse warning. I guess that's why I didn't find it. > But a build error is worse. > >> created for it which right now resides in my bluetooth-next tree[3]. >> [3] http://git.kernel.org/?p=linux/kernel/git/jh/bluetooth-next.git;a=commitdiff;h=cd555072d0b0738c8a107776fe91902da686f94d This doesn't seem to be in linux-next, as -next pulls git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-next.git instead? Can we please get the fix in mainline ASAP, as it breaks the build with some versions of gcc? Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-06 10:41 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-01-15 10:07 [PATCH] blutetooth: Remove bogus inline for l2cap_chan_connect() Geert Uytterhoeven [not found] ` <1326622076-957-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> 2012-01-15 10:52 ` Johan Hedberg 2012-01-15 11:25 ` Geert Uytterhoeven 2012-02-06 10:41 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).