Commit 90972b22116bc22181717517ad5b0c7043edb178

Authored by Joe Perches
Committed by David S. Miller
1 parent cd2cf63a56

arp/neighbour.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.

Reflow modified prototypes to 80 columns.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 2 changed files with 63 additions and 65 deletions Side-by-side Diff

... ... @@ -46,22 +46,22 @@
46 46 return n;
47 47 }
48 48  
49   -extern void arp_init(void);
50   -extern int arp_find(unsigned char *haddr, struct sk_buff *skb);
51   -extern int arp_ioctl(struct net *net, unsigned int cmd, void __user *arg);
52   -extern void arp_send(int type, int ptype, __be32 dest_ip,
53   - struct net_device *dev, __be32 src_ip,
54   - const unsigned char *dest_hw,
55   - const unsigned char *src_hw, const unsigned char *th);
56   -extern int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir);
57   -extern void arp_ifdown(struct net_device *dev);
  49 +void arp_init(void);
  50 +int arp_find(unsigned char *haddr, struct sk_buff *skb);
  51 +int arp_ioctl(struct net *net, unsigned int cmd, void __user *arg);
  52 +void arp_send(int type, int ptype, __be32 dest_ip,
  53 + struct net_device *dev, __be32 src_ip,
  54 + const unsigned char *dest_hw,
  55 + const unsigned char *src_hw, const unsigned char *th);
  56 +int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir);
  57 +void arp_ifdown(struct net_device *dev);
58 58  
59   -extern struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
60   - struct net_device *dev, __be32 src_ip,
61   - const unsigned char *dest_hw,
62   - const unsigned char *src_hw,
63   - const unsigned char *target_hw);
64   -extern void arp_xmit(struct sk_buff *skb);
  59 +struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
  60 + struct net_device *dev, __be32 src_ip,
  61 + const unsigned char *dest_hw,
  62 + const unsigned char *src_hw,
  63 + const unsigned char *target_hw);
  64 +void arp_xmit(struct sk_buff *skb);
65 65 int arp_invalidate(struct net_device *dev, __be32 ip);
66 66  
67 67 #endif /* _ARP_H */
include/net/neighbour.h
... ... @@ -195,68 +195,67 @@
195 195 #define NEIGH_UPDATE_F_ISROUTER 0x40000000
196 196 #define NEIGH_UPDATE_F_ADMIN 0x80000000
197 197  
198   -extern void neigh_table_init(struct neigh_table *tbl);
199   -extern int neigh_table_clear(struct neigh_table *tbl);
200   -extern struct neighbour * neigh_lookup(struct neigh_table *tbl,
201   - const void *pkey,
202   - struct net_device *dev);
203   -extern struct neighbour * neigh_lookup_nodev(struct neigh_table *tbl,
204   - struct net *net,
205   - const void *pkey);
206   -extern struct neighbour * __neigh_create(struct neigh_table *tbl,
207   - const void *pkey,
208   - struct net_device *dev,
209   - bool want_ref);
  198 +void neigh_table_init(struct neigh_table *tbl);
  199 +int neigh_table_clear(struct neigh_table *tbl);
  200 +struct neighbour *neigh_lookup(struct neigh_table *tbl, const void *pkey,
  201 + struct net_device *dev);
  202 +struct neighbour *neigh_lookup_nodev(struct neigh_table *tbl, struct net *net,
  203 + const void *pkey);
  204 +struct neighbour *__neigh_create(struct neigh_table *tbl, const void *pkey,
  205 + struct net_device *dev, bool want_ref);
210 206 static inline struct neighbour *neigh_create(struct neigh_table *tbl,
211 207 const void *pkey,
212 208 struct net_device *dev)
213 209 {
214 210 return __neigh_create(tbl, pkey, dev, true);
215 211 }
216   -extern void neigh_destroy(struct neighbour *neigh);
217   -extern int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb);
218   -extern int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
219   - u32 flags);
220   -extern void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev);
221   -extern int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev);
222   -extern int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb);
223   -extern int neigh_connected_output(struct neighbour *neigh, struct sk_buff *skb);
224   -extern int neigh_compat_output(struct neighbour *neigh, struct sk_buff *skb);
225   -extern int neigh_direct_output(struct neighbour *neigh, struct sk_buff *skb);
226   -extern struct neighbour *neigh_event_ns(struct neigh_table *tbl,
  212 +void neigh_destroy(struct neighbour *neigh);
  213 +int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb);
  214 +int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, u32 flags);
  215 +void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev);
  216 +int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev);
  217 +int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb);
  218 +int neigh_connected_output(struct neighbour *neigh, struct sk_buff *skb);
  219 +int neigh_compat_output(struct neighbour *neigh, struct sk_buff *skb);
  220 +int neigh_direct_output(struct neighbour *neigh, struct sk_buff *skb);
  221 +struct neighbour *neigh_event_ns(struct neigh_table *tbl,
227 222 u8 *lladdr, void *saddr,
228 223 struct net_device *dev);
229 224  
230   -extern struct neigh_parms *neigh_parms_alloc(struct net_device *dev, struct neigh_table *tbl);
231   -extern void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms);
  225 +struct neigh_parms *neigh_parms_alloc(struct net_device *dev,
  226 + struct neigh_table *tbl);
  227 +void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms);
232 228  
233 229 static inline
234   -struct net *neigh_parms_net(const struct neigh_parms *parms)
  230 +struct net *neigh_parms_net(const struct neigh_parms *parms)
235 231 {
236 232 return read_pnet(&parms->net);
237 233 }
238 234  
239   -extern unsigned long neigh_rand_reach_time(unsigned long base);
  235 +unsigned long neigh_rand_reach_time(unsigned long base);
240 236  
241   -extern void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p,
242   - struct sk_buff *skb);
243   -extern struct pneigh_entry *pneigh_lookup(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev, int creat);
244   -extern struct pneigh_entry *__pneigh_lookup(struct neigh_table *tbl,
245   - struct net *net,
246   - const void *key,
247   - struct net_device *dev);
248   -extern int pneigh_delete(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev);
  237 +void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p,
  238 + struct sk_buff *skb);
  239 +struct pneigh_entry *pneigh_lookup(struct neigh_table *tbl, struct net *net,
  240 + const void *key, struct net_device *dev,
  241 + int creat);
  242 +struct pneigh_entry *__pneigh_lookup(struct neigh_table *tbl, struct net *net,
  243 + const void *key, struct net_device *dev);
  244 +int pneigh_delete(struct neigh_table *tbl, struct net *net, const void *key,
  245 + struct net_device *dev);
249 246  
250   -static inline
251   -struct net *pneigh_net(const struct pneigh_entry *pneigh)
  247 +static inline struct net *pneigh_net(const struct pneigh_entry *pneigh)
252 248 {
253 249 return read_pnet(&pneigh->net);
254 250 }
255 251  
256   -extern void neigh_app_ns(struct neighbour *n);
257   -extern void neigh_for_each(struct neigh_table *tbl, void (*cb)(struct neighbour *, void *), void *cookie);
258   -extern void __neigh_for_each_release(struct neigh_table *tbl, int (*cb)(struct neighbour *));
259   -extern void pneigh_for_each(struct neigh_table *tbl, void (*cb)(struct pneigh_entry *));
  252 +void neigh_app_ns(struct neighbour *n);
  253 +void neigh_for_each(struct neigh_table *tbl,
  254 + void (*cb)(struct neighbour *, void *), void *cookie);
  255 +void __neigh_for_each_release(struct neigh_table *tbl,
  256 + int (*cb)(struct neighbour *));
  257 +void pneigh_for_each(struct neigh_table *tbl,
  258 + void (*cb)(struct pneigh_entry *));
260 259  
261 260 struct neigh_seq_state {
262 261 struct seq_net_private p;
263 262  
... ... @@ -270,15 +269,14 @@
270 269 #define NEIGH_SEQ_IS_PNEIGH 0x00000002
271 270 #define NEIGH_SEQ_SKIP_NOARP 0x00000004
272 271 };
273   -extern void *neigh_seq_start(struct seq_file *, loff_t *, struct neigh_table *, unsigned int);
274   -extern void *neigh_seq_next(struct seq_file *, void *, loff_t *);
275   -extern void neigh_seq_stop(struct seq_file *, void *);
  272 +void *neigh_seq_start(struct seq_file *, loff_t *, struct neigh_table *,
  273 + unsigned int);
  274 +void *neigh_seq_next(struct seq_file *, void *, loff_t *);
  275 +void neigh_seq_stop(struct seq_file *, void *);
276 276  
277   -extern int neigh_sysctl_register(struct net_device *dev,
278   - struct neigh_parms *p,
279   - char *p_name,
280   - proc_handler *proc_handler);
281   -extern void neigh_sysctl_unregister(struct neigh_parms *p);
  277 +int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
  278 + char *p_name, proc_handler *proc_handler);
  279 +void neigh_sysctl_unregister(struct neigh_parms *p);
282 280  
283 281 static inline void __neigh_parms_put(struct neigh_parms *parms)
284 282 {