Skip to contentSkip to conversation

net/irda/: proper prototypes

PATCH In review Adrian Bunk 3 participants 5 messages Dec 18, 2006 – Jan 2, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/irda/: proper prototypes

This patch adds proper prototypes for some functions in include/net/irda/irda.h

---

 include/net/irda/irda.h |   15 +++++++++++++++
 net/irda/irmod.c        |   13 -------------
 2 files changed, 15 insertions(+), 13 deletions(-)
include/net/irda/irda.h renamed from include/net/irda/irda.h.old +15 -0
@@ -113,4 +113,19 @@
 #define IAS_IRCOMM_ID 0x2343
 #define IAS_IRLPT_ID  0x9876
 
+struct net_device;
+struct packet_type;
+
+void irda_proc_register(void);
+void irda_proc_unregister(void);
+
+int irda_sysctl_register(void);
+void irda_sysctl_unregister(void);
+
+int irsock_init(void);
+void irsock_cleanup(void);
+
+int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
+		     struct packet_type *ptype, struct net_device *orig_dev);
+
 #endif /* NET_IRDA_H */
net/irda/irmod.c renamed from net/irda/irmod.c.old +0 -13
@@ -42,19 +42,6 @@
 #include <net/irda/irttp.h>		/* irttp_init */
 #include <net/irda/irda_device.h>	/* irda_device_init */
 
-/* irproc.c */
-extern void irda_proc_register(void);
-extern void irda_proc_unregister(void);
-/* irsysctl.c */
-extern int  irda_sysctl_register(void);
-extern void irda_sysctl_unregister(void);
-/* af_irda.c */
-extern int  irsock_init(void);
-extern void irsock_cleanup(void);
-/* irlap_frame.c */
-extern int  irlap_driver_rcv(struct sk_buff *, struct net_device *, 
-			     struct packet_type *, struct net_device *);
-
 /*
  * Module parameters
  */
#1 lore raw

Hi Adrian,

Quoted 4 lines · Adrian Bunk

This patch adds proper prototypes for some functions in include/net/irda/irda.h

looks good to me, thanks.

Cheers,
Samuel.

Quoted 52 lines

---

 include/net/irda/irda.h |   15 +++++++++++++++
 net/irda/irmod.c        |   13 -------------
 2 files changed, 15 insertions(+), 13 deletions(-)
include/net/irda/irda.h renamed from include/net/irda/irda.h.old +15 -0
@@ -113,4 +113,19 @@
 #define IAS_IRCOMM_ID 0x2343
 #define IAS_IRLPT_ID  0x9876
 
+struct net_device;
+struct packet_type;
+
+void irda_proc_register(void);
+void irda_proc_unregister(void);
+
+int irda_sysctl_register(void);
+void irda_sysctl_unregister(void);
+
+int irsock_init(void);
+void irsock_cleanup(void);
+
+int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
+		     struct packet_type *ptype, struct net_device *orig_dev);
+
 #endif /* NET_IRDA_H */
net/irda/irmod.c renamed from net/irda/irmod.c.old +0 -13
@@ -42,19 +42,6 @@
 #include <net/irda/irttp.h>		/* irttp_init */
 #include <net/irda/irda_device.h>	/* irda_device_init */
 
-/* irproc.c */
-extern void irda_proc_register(void);
-extern void irda_proc_unregister(void);
-/* irsysctl.c */
-extern int  irda_sysctl_register(void);
-extern void irda_sysctl_unregister(void);
-/* af_irda.c */
-extern int  irsock_init(void);
-extern void irsock_cleanup(void);
-/* irlap_frame.c */
-extern int  irlap_driver_rcv(struct sk_buff *, struct net_device *, 
-			     struct packet_type *, struct net_device *);
-
 /*
  * Module parameters
  */
maintainer
#2 lore raw
In reply to Adrian Bunk

From: Adrian Bunk <[email protected]>
Date: Mon, 18 Dec 2006 04:46:26 +0100

Quoted 4 lines

This patch adds proper prototypes for some functions in include/net/irda/irda.h

...

Quoted 4 lines
include/net/irda/irda.h renamed from include/net/irda/irda.h.old +4 -0
+struct net_device;
+struct packet_type;
+
+void irda_proc_register(void);

include/net/irda/irda.h line 129

Quoted 10 lines
include/net/irda/irda.h renamed from include/net/irda/irda.h.old +10 -0
+void irda_proc_unregister(void);
+
+int irda_sysctl_register(void);
+void irda_sysctl_unregister(void);
+
+int irsock_init(void);
+void irsock_cleanup(void);
+
+int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
+		     struct packet_type *ptype, struct net_device *orig_dev);

Remind me why you remove the "extern" from "external" function declarations all the time?

I don't like it, even if it's "correct", because it is inconsistent with what we do in the entire rest of the networking code.

#3 lore raw
Quoted 17 lines · David Miller

From: Adrian Bunk <[email protected]>
Date: Mon, 18 Dec 2006 04:46:26 +0100

Quoted 4 lines

This patch adds proper prototypes for some functions in include/net/irda/irda.h

...

Quoted 9 lines
include/net/irda/irda.h renamed from include/net/irda/irda.h.old +9 -0
+struct net_device;
+struct packet_type;
+
+void irda_proc_register(void);
+void irda_proc_unregister(void);
+
+int irda_sysctl_register(void);
+void irda_sysctl_unregister(void);
+
Quoted 8 lines

include/net/irda/irda.h line 129

Quoted 5 lines
include/net/irda/irda.h renamed from include/net/irda/irda.h.old +5 -0
+int irsock_init(void);
+void irsock_cleanup(void);
+
+int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
+		     struct packet_type *ptype, struct net_device *orig_dev);

Remind me why you remove the "extern" from "external" function declarations all the time?

It's shorter, letting more contents fit into one line.

Quoted 2 lines

I don't like it, even if it's "correct", because it is inconsistent with what we do in the entire rest of the networking code.

Good point.

Is it OK to slowly starting converting them or do you want them to stay?

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
maintainer
#4 lore raw

From: Adrian Bunk <[email protected]>
Date: Tue, 2 Jan 2007 13:45:57 +0100

Quoted 7 lines · David Miller
Quoted 2 lines

I don't like it, even if it's "correct", because it is inconsistent with what we do in the entire rest of the networking code.

Good point.

Is it OK to slowly starting converting them or do you want them to stay?

If I saw some value in it I'd say to convert, but I don't so I'd say let's keep them the way they are.