Commit f629d208 authored by Joe Perches's avatar Joe Perches

[networking]device.h: Remove extern from function prototypes

There are a mix of function prototypes with and without extern
in the kernel sources.  Standardize on not using extern for
function prototypes.

Function prototypes don't need to be written with extern.
extern is assumed by the compiler.  Its use is as unnecessary as
using auto to declare automatic/local variables in a block.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
parent 7965bd4d
...@@ -28,27 +28,24 @@ ...@@ -28,27 +28,24 @@
#include <asm/unaligned.h> #include <asm/unaligned.h>
#ifdef __KERNEL__ #ifdef __KERNEL__
extern __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev); __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev);
extern const struct header_ops eth_header_ops; extern const struct header_ops eth_header_ops;
extern int eth_header(struct sk_buff *skb, struct net_device *dev, int eth_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
unsigned short type,
const void *daddr, const void *saddr, unsigned len); const void *daddr, const void *saddr, unsigned len);
extern int eth_rebuild_header(struct sk_buff *skb); int eth_rebuild_header(struct sk_buff *skb);
extern int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr); int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr);
extern int eth_header_cache(const struct neighbour *neigh, struct hh_cache *hh, __be16 type); int eth_header_cache(const struct neighbour *neigh, struct hh_cache *hh,
extern void eth_header_cache_update(struct hh_cache *hh, __be16 type);
const struct net_device *dev, void eth_header_cache_update(struct hh_cache *hh, const struct net_device *dev,
const unsigned char *haddr); const unsigned char *haddr);
extern int eth_prepare_mac_addr_change(struct net_device *dev, void *p); int eth_prepare_mac_addr_change(struct net_device *dev, void *p);
extern void eth_commit_mac_addr_change(struct net_device *dev, void *p); void eth_commit_mac_addr_change(struct net_device *dev, void *p);
extern int eth_mac_addr(struct net_device *dev, void *p); int eth_mac_addr(struct net_device *dev, void *p);
extern int eth_change_mtu(struct net_device *dev, int new_mtu); int eth_change_mtu(struct net_device *dev, int new_mtu);
extern int eth_validate_addr(struct net_device *dev); int eth_validate_addr(struct net_device *dev);
struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs,
extern struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs,
unsigned int rxqs); unsigned int rxqs);
#define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1) #define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1)
#define alloc_etherdev_mq(sizeof_priv, count) alloc_etherdev_mqs(sizeof_priv, count, count) #define alloc_etherdev_mq(sizeof_priv, count) alloc_etherdev_mqs(sizeof_priv, count, count)
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <linux/if_fc.h> #include <linux/if_fc.h>
#ifdef __KERNEL__ #ifdef __KERNEL__
extern struct net_device *alloc_fcdev(int sizeof_priv); struct net_device *alloc_fcdev(int sizeof_priv);
#endif #endif
#endif /* _LINUX_FCDEVICE_H */ #endif /* _LINUX_FCDEVICE_H */
...@@ -25,10 +25,9 @@ ...@@ -25,10 +25,9 @@
#include <linux/if_fddi.h> #include <linux/if_fddi.h>
#ifdef __KERNEL__ #ifdef __KERNEL__
extern __be16 fddi_type_trans(struct sk_buff *skb, __be16 fddi_type_trans(struct sk_buff *skb, struct net_device *dev);
struct net_device *dev); int fddi_change_mtu(struct net_device *dev, int new_mtu);
extern int fddi_change_mtu(struct net_device *dev, int new_mtu); struct net_device *alloc_fddidev(int sizeof_priv);
extern struct net_device *alloc_fddidev(int sizeof_priv);
#endif #endif
#endif /* _LINUX_FDDIDEVICE_H */ #endif /* _LINUX_FDDIDEVICE_H */
...@@ -31,11 +31,11 @@ struct hippi_cb { ...@@ -31,11 +31,11 @@ struct hippi_cb {
__u32 ifield; __u32 ifield;
}; };
extern __be16 hippi_type_trans(struct sk_buff *skb, struct net_device *dev); __be16 hippi_type_trans(struct sk_buff *skb, struct net_device *dev);
extern int hippi_change_mtu(struct net_device *dev, int new_mtu); int hippi_change_mtu(struct net_device *dev, int new_mtu);
extern int hippi_mac_addr(struct net_device *dev, void *p); int hippi_mac_addr(struct net_device *dev, void *p);
extern int hippi_neigh_setup_dev(struct net_device *dev, struct neigh_parms *p); int hippi_neigh_setup_dev(struct net_device *dev, struct neigh_parms *p);
extern struct net_device *alloc_hippi_dev(int sizeof_priv); struct net_device *alloc_hippi_dev(int sizeof_priv);
#endif #endif
#endif /* _LINUX_HIPPIDEVICE_H */ #endif /* _LINUX_HIPPIDEVICE_H */
...@@ -147,25 +147,27 @@ struct in_ifaddr { ...@@ -147,25 +147,27 @@ struct in_ifaddr {
unsigned long ifa_tstamp; /* updated timestamp */ unsigned long ifa_tstamp; /* updated timestamp */
}; };
extern int register_inetaddr_notifier(struct notifier_block *nb); int register_inetaddr_notifier(struct notifier_block *nb);
extern int unregister_inetaddr_notifier(struct notifier_block *nb); int unregister_inetaddr_notifier(struct notifier_block *nb);
extern void inet_netconf_notify_devconf(struct net *net, int type, int ifindex, void inet_netconf_notify_devconf(struct net *net, int type, int ifindex,
struct ipv4_devconf *devconf); struct ipv4_devconf *devconf);
extern struct net_device *__ip_dev_find(struct net *net, __be32 addr, bool devref); struct net_device *__ip_dev_find(struct net *net, __be32 addr, bool devref);
static inline struct net_device *ip_dev_find(struct net *net, __be32 addr) static inline struct net_device *ip_dev_find(struct net *net, __be32 addr)
{ {
return __ip_dev_find(net, addr, true); return __ip_dev_find(net, addr, true);
} }
extern int inet_addr_onlink(struct in_device *in_dev, __be32 a, __be32 b); int inet_addr_onlink(struct in_device *in_dev, __be32 a, __be32 b);
extern int devinet_ioctl(struct net *net, unsigned int cmd, void __user *); int devinet_ioctl(struct net *net, unsigned int cmd, void __user *);
extern void devinet_init(void); void devinet_init(void);
extern struct in_device *inetdev_by_index(struct net *, int); struct in_device *inetdev_by_index(struct net *, int);
extern __be32 inet_select_addr(const struct net_device *dev, __be32 dst, int scope); __be32 inet_select_addr(const struct net_device *dev, __be32 dst, int scope);
extern __be32 inet_confirm_addr(struct in_device *in_dev, __be32 dst, __be32 local, int scope); __be32 inet_confirm_addr(struct in_device *in_dev, __be32 dst, __be32 local,
extern struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, __be32 prefix, __be32 mask); int scope);
struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, __be32 prefix,
__be32 mask);
static __inline__ int inet_ifa_match(__be32 addr, struct in_ifaddr *ifa) static __inline__ int inet_ifa_match(__be32 addr, struct in_ifaddr *ifa)
{ {
...@@ -218,7 +220,7 @@ static inline struct in_device *__in_dev_get_rtnl(const struct net_device *dev) ...@@ -218,7 +220,7 @@ static inline struct in_device *__in_dev_get_rtnl(const struct net_device *dev)
return rtnl_dereference(dev->ip_ptr); return rtnl_dereference(dev->ip_ptr);
} }
extern void in_dev_finish_destroy(struct in_device *idev); void in_dev_finish_destroy(struct in_device *idev);
static inline void in_dev_put(struct in_device *idev) static inline void in_dev_put(struct in_device *idev)
{ {
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment