* [PATCH] phonet: fix compilation with gcc-3.4
@ 2008-11-17 10:03 Alexey Dobriyan
2008-11-19 22:17 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2008-11-17 10:03 UTC (permalink / raw)
To: davem; +Cc: netdev, remi.denis-courmont
CC [M] net/phonet/af_phonet.o
net/phonet/af_phonet.c: In function `pn_socket_create':
net/phonet/af_phonet.c:38: sorry, unimplemented: inlining failed in call to 'phonet_proto_put': function body not available
net/phonet/af_phonet.c:99: sorry, unimplemented: called from here
make[3]: *** [net/phonet/af_phonet.o] Error 1
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
net/phonet/af_phonet.c | 52 ++++++++++++++++++++++---------------------------
1 file changed, 24 insertions(+), 28 deletions(-)
--- a/net/phonet/af_phonet.c
+++ b/net/phonet/af_phonet.c
@@ -33,9 +33,30 @@
#include <net/phonet/phonet.h>
#include <net/phonet/pn_dev.h>
-static struct net_proto_family phonet_proto_family;
-static struct phonet_protocol *phonet_proto_get(int protocol);
-static inline void phonet_proto_put(struct phonet_protocol *pp);
+/* Transport protocol registration */
+static struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly;
+static DEFINE_SPINLOCK(proto_tab_lock);
+
+static struct phonet_protocol *phonet_proto_get(int protocol)
+{
+ struct phonet_protocol *pp;
+
+ if (protocol >= PHONET_NPROTO)
+ return NULL;
+
+ spin_lock(&proto_tab_lock);
+ pp = proto_tab[protocol];
+ if (pp && !try_module_get(pp->prot->owner))
+ pp = NULL;
+ spin_unlock(&proto_tab_lock);
+
+ return pp;
+}
+
+static inline void phonet_proto_put(struct phonet_protocol *pp)
+{
+ module_put(pp->prot->owner);
+}
/* protocol family functions */
@@ -375,10 +396,6 @@ static struct packet_type phonet_packet_type = {
.func = phonet_rcv,
};
-/* Transport protocol registration */
-static struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly;
-static DEFINE_SPINLOCK(proto_tab_lock);
-
int __init_or_module phonet_proto_register(int protocol,
struct phonet_protocol *pp)
{
@@ -412,27 +429,6 @@ void phonet_proto_unregister(int protocol, struct phonet_protocol *pp)
}
EXPORT_SYMBOL(phonet_proto_unregister);
-static struct phonet_protocol *phonet_proto_get(int protocol)
-{
- struct phonet_protocol *pp;
-
- if (protocol >= PHONET_NPROTO)
- return NULL;
-
- spin_lock(&proto_tab_lock);
- pp = proto_tab[protocol];
- if (pp && !try_module_get(pp->prot->owner))
- pp = NULL;
- spin_unlock(&proto_tab_lock);
-
- return pp;
-}
-
-static inline void phonet_proto_put(struct phonet_protocol *pp)
-{
- module_put(pp->prot->owner);
-}
-
/* Module registration */
static int __init phonet_init(void)
{
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] phonet: fix compilation with gcc-3.4
2008-11-17 10:03 [PATCH] phonet: fix compilation with gcc-3.4 Alexey Dobriyan
@ 2008-11-19 22:17 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-11-19 22:17 UTC (permalink / raw)
To: adobriyan; +Cc: netdev, remi.denis-courmont
From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Mon, 17 Nov 2008 13:03:20 +0300
> CC [M] net/phonet/af_phonet.o
> net/phonet/af_phonet.c: In function `pn_socket_create':
> net/phonet/af_phonet.c:38: sorry, unimplemented: inlining failed in call to 'phonet_proto_put': function body not available
> net/phonet/af_phonet.c:99: sorry, unimplemented: called from here
> make[3]: *** [net/phonet/af_phonet.o] Error 1
>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Also applied, thanks Alexey.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-19 22:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-17 10:03 [PATCH] phonet: fix compilation with gcc-3.4 Alexey Dobriyan
2008-11-19 22:17 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox