diff options
author | Joe Perches <joe@perches.com> | 2013-07-31 01:47:13 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-07-31 20:24:22 -0400 |
commit | 5c15257f93234aaa9775291a041b49eeb38fd95a (patch) | |
tree | ca42e94710f78cf542b141f1b20693144e51feac | |
parent | c34a761231b56dea4bd205cb9c29ffe37475d232 (diff) |
net: Remove extern from include/net/ scheduling 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>
-rw-r--r-- | include/net/act_api.h | 60 | ||||
-rw-r--r-- | include/net/pkt_cls.h | 42 | ||||
-rw-r--r-- | include/net/pkt_sched.h | 50 | ||||
-rw-r--r-- | include/net/sch_generic.h | 53 |
4 files changed, 104 insertions, 101 deletions
diff --git a/include/net/act_api.h b/include/net/act_api.h index b8ffac7b6bab..9e90fdff470d 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h | |||
@@ -82,36 +82,36 @@ struct tc_action_ops { | |||
82 | int (*walk)(struct sk_buff *, struct netlink_callback *, int, struct tc_action *); | 82 | int (*walk)(struct sk_buff *, struct netlink_callback *, int, struct tc_action *); |
83 | }; | 83 | }; |
84 | 84 | ||
85 | extern struct tcf_common *tcf_hash_lookup(u32 index, | 85 | struct tcf_common *tcf_hash_lookup(u32 index, struct tcf_hashinfo *hinfo); |
86 | struct tcf_hashinfo *hinfo); | 86 | void tcf_hash_destroy(struct tcf_common *p, struct tcf_hashinfo *hinfo); |
87 | extern void tcf_hash_destroy(struct tcf_common *p, struct tcf_hashinfo *hinfo); | 87 | int tcf_hash_release(struct tcf_common *p, int bind, |
88 | extern int tcf_hash_release(struct tcf_common *p, int bind, | 88 | struct tcf_hashinfo *hinfo); |
89 | struct tcf_hashinfo *hinfo); | 89 | int tcf_generic_walker(struct sk_buff *skb, struct netlink_callback *cb, |
90 | extern int tcf_generic_walker(struct sk_buff *skb, struct netlink_callback *cb, | 90 | int type, struct tc_action *a); |
91 | int type, struct tc_action *a); | 91 | u32 tcf_hash_new_index(u32 *idx_gen, struct tcf_hashinfo *hinfo); |
92 | extern u32 tcf_hash_new_index(u32 *idx_gen, struct tcf_hashinfo *hinfo); | 92 | int tcf_hash_search(struct tc_action *a, u32 index); |
93 | extern int tcf_hash_search(struct tc_action *a, u32 index); | 93 | struct tcf_common *tcf_hash_check(u32 index, struct tc_action *a, |
94 | extern struct tcf_common *tcf_hash_check(u32 index, struct tc_action *a, | 94 | int bind, struct tcf_hashinfo *hinfo); |
95 | int bind, struct tcf_hashinfo *hinfo); | 95 | struct tcf_common *tcf_hash_create(u32 index, struct nlattr *est, |
96 | extern struct tcf_common *tcf_hash_create(u32 index, struct nlattr *est, | 96 | struct tc_action *a, int size, |
97 | struct tc_action *a, int size, | 97 | int bind, u32 *idx_gen, |
98 | int bind, u32 *idx_gen, | 98 | struct tcf_hashinfo *hinfo); |
99 | struct tcf_hashinfo *hinfo); | 99 | void tcf_hash_insert(struct tcf_common *p, struct tcf_hashinfo *hinfo); |
100 | extern void tcf_hash_insert(struct tcf_common *p, struct tcf_hashinfo *hinfo); | ||
101 | 100 | ||
102 | extern int tcf_register_action(struct tc_action_ops *a); | 101 | int tcf_register_action(struct tc_action_ops *a); |
103 | extern int tcf_unregister_action(struct tc_action_ops *a); | 102 | int tcf_unregister_action(struct tc_action_ops *a); |
104 | extern void tcf_action_destroy(struct tc_action *a, int bind); | 103 | void tcf_action_destroy(struct tc_action *a, int bind); |
105 | extern int tcf_action_exec(struct sk_buff *skb, const struct tc_action *a, struct tcf_result *res); | 104 | int tcf_action_exec(struct sk_buff *skb, const struct tc_action *a, |
106 | extern struct tc_action *tcf_action_init(struct net *net, struct nlattr *nla, | 105 | struct tcf_result *res); |
107 | struct nlattr *est, char *n, int ovr, | 106 | struct tc_action *tcf_action_init(struct net *net, struct nlattr *nla, |
108 | int bind); | 107 | struct nlattr *est, char *n, int ovr, |
109 | extern struct tc_action *tcf_action_init_1(struct net *net, struct nlattr *nla, | 108 | int bind); |
110 | struct nlattr *est, char *n, int ovr, | 109 | struct tc_action *tcf_action_init_1(struct net *net, struct nlattr *nla, |
111 | int bind); | 110 | struct nlattr *est, char *n, int ovr, |
112 | extern int tcf_action_dump(struct sk_buff *skb, struct tc_action *a, int, int); | 111 | int bind); |
113 | extern int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int, int); | 112 | int tcf_action_dump(struct sk_buff *skb, struct tc_action *a, int, int); |
114 | extern int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int); | 113 | int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int, int); |
115 | extern int tcf_action_copy_stats (struct sk_buff *,struct tc_action *, int); | 114 | int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int); |
115 | int tcf_action_copy_stats(struct sk_buff *, struct tc_action *, int); | ||
116 | #endif /* CONFIG_NET_CLS_ACT */ | 116 | #endif /* CONFIG_NET_CLS_ACT */ |
117 | #endif | 117 | #endif |
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index 13174509cdfd..2ebef77a2f9a 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h | |||
@@ -14,8 +14,8 @@ struct tcf_walker { | |||
14 | int (*fn)(struct tcf_proto *, unsigned long node, struct tcf_walker *); | 14 | int (*fn)(struct tcf_proto *, unsigned long node, struct tcf_walker *); |
15 | }; | 15 | }; |
16 | 16 | ||
17 | extern int register_tcf_proto_ops(struct tcf_proto_ops *ops); | 17 | int register_tcf_proto_ops(struct tcf_proto_ops *ops); |
18 | extern int unregister_tcf_proto_ops(struct tcf_proto_ops *ops); | 18 | int unregister_tcf_proto_ops(struct tcf_proto_ops *ops); |
19 | 19 | ||
20 | static inline unsigned long | 20 | static inline unsigned long |
21 | __cls_set_class(unsigned long *clp, unsigned long cl) | 21 | __cls_set_class(unsigned long *clp, unsigned long cl) |
@@ -126,17 +126,17 @@ tcf_exts_exec(struct sk_buff *skb, struct tcf_exts *exts, | |||
126 | return 0; | 126 | return 0; |
127 | } | 127 | } |
128 | 128 | ||
129 | extern int tcf_exts_validate(struct net *net, struct tcf_proto *tp, | 129 | int tcf_exts_validate(struct net *net, struct tcf_proto *tp, |
130 | struct nlattr **tb, struct nlattr *rate_tlv, | 130 | struct nlattr **tb, struct nlattr *rate_tlv, |
131 | struct tcf_exts *exts, | 131 | struct tcf_exts *exts, |
132 | const struct tcf_ext_map *map); | 132 | const struct tcf_ext_map *map); |
133 | extern void tcf_exts_destroy(struct tcf_proto *tp, struct tcf_exts *exts); | 133 | void tcf_exts_destroy(struct tcf_proto *tp, struct tcf_exts *exts); |
134 | extern void tcf_exts_change(struct tcf_proto *tp, struct tcf_exts *dst, | 134 | void tcf_exts_change(struct tcf_proto *tp, struct tcf_exts *dst, |
135 | struct tcf_exts *src); | 135 | struct tcf_exts *src); |
136 | extern int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts, | 136 | int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts, |
137 | const struct tcf_ext_map *map); | 137 | const struct tcf_ext_map *map); |
138 | extern int tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts, | 138 | int tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts, |
139 | const struct tcf_ext_map *map); | 139 | const struct tcf_ext_map *map); |
140 | 140 | ||
141 | /** | 141 | /** |
142 | * struct tcf_pkt_info - packet information | 142 | * struct tcf_pkt_info - packet information |
@@ -239,14 +239,14 @@ struct tcf_ematch_ops { | |||
239 | struct list_head link; | 239 | struct list_head link; |
240 | }; | 240 | }; |
241 | 241 | ||
242 | extern int tcf_em_register(struct tcf_ematch_ops *); | 242 | int tcf_em_register(struct tcf_ematch_ops *); |
243 | extern void tcf_em_unregister(struct tcf_ematch_ops *); | 243 | void tcf_em_unregister(struct tcf_ematch_ops *); |
244 | extern int tcf_em_tree_validate(struct tcf_proto *, struct nlattr *, | 244 | int tcf_em_tree_validate(struct tcf_proto *, struct nlattr *, |
245 | struct tcf_ematch_tree *); | 245 | struct tcf_ematch_tree *); |
246 | extern void tcf_em_tree_destroy(struct tcf_proto *, struct tcf_ematch_tree *); | 246 | void tcf_em_tree_destroy(struct tcf_proto *, struct tcf_ematch_tree *); |
247 | extern int tcf_em_tree_dump(struct sk_buff *, struct tcf_ematch_tree *, int); | 247 | int tcf_em_tree_dump(struct sk_buff *, struct tcf_ematch_tree *, int); |
248 | extern int __tcf_em_tree_match(struct sk_buff *, struct tcf_ematch_tree *, | 248 | int __tcf_em_tree_match(struct sk_buff *, struct tcf_ematch_tree *, |
249 | struct tcf_pkt_info *); | 249 | struct tcf_pkt_info *); |
250 | 250 | ||
251 | /** | 251 | /** |
252 | * tcf_em_tree_change - replace ematch tree of a running classifier | 252 | * tcf_em_tree_change - replace ematch tree of a running classifier |
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 388bf8b6d060..f7c24f8fbdc5 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -64,8 +64,8 @@ struct qdisc_watchdog { | |||
64 | struct Qdisc *qdisc; | 64 | struct Qdisc *qdisc; |
65 | }; | 65 | }; |
66 | 66 | ||
67 | extern void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc); | 67 | void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc); |
68 | extern void qdisc_watchdog_schedule_ns(struct qdisc_watchdog *wd, u64 expires); | 68 | void qdisc_watchdog_schedule_ns(struct qdisc_watchdog *wd, u64 expires); |
69 | 69 | ||
70 | static inline void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, | 70 | static inline void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, |
71 | psched_time_t expires) | 71 | psched_time_t expires) |
@@ -73,31 +73,31 @@ static inline void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, | |||
73 | qdisc_watchdog_schedule_ns(wd, PSCHED_TICKS2NS(expires)); | 73 | qdisc_watchdog_schedule_ns(wd, PSCHED_TICKS2NS(expires)); |
74 | } | 74 | } |
75 | 75 | ||
76 | extern void qdisc_watchdog_cancel(struct qdisc_watchdog *wd); | 76 | void qdisc_watchdog_cancel(struct qdisc_watchdog *wd); |
77 | 77 | ||
78 | extern struct Qdisc_ops pfifo_qdisc_ops; | 78 | extern struct Qdisc_ops pfifo_qdisc_ops; |
79 | extern struct Qdisc_ops bfifo_qdisc_ops; | 79 | extern struct Qdisc_ops bfifo_qdisc_ops; |
80 | extern struct Qdisc_ops pfifo_head_drop_qdisc_ops; | 80 | extern struct Qdisc_ops pfifo_head_drop_qdisc_ops; |
81 | 81 | ||
82 | extern int fifo_set_limit(struct Qdisc *q, unsigned int limit); | 82 | int fifo_set_limit(struct Qdisc *q, unsigned int limit); |
83 | extern struct Qdisc *fifo_create_dflt(struct Qdisc *sch, struct Qdisc_ops *ops, | 83 | struct Qdisc *fifo_create_dflt(struct Qdisc *sch, struct Qdisc_ops *ops, |
84 | unsigned int limit); | 84 | unsigned int limit); |
85 | 85 | ||
86 | extern int register_qdisc(struct Qdisc_ops *qops); | 86 | int register_qdisc(struct Qdisc_ops *qops); |
87 | extern int unregister_qdisc(struct Qdisc_ops *qops); | 87 | int unregister_qdisc(struct Qdisc_ops *qops); |
88 | extern void qdisc_list_del(struct Qdisc *q); | 88 | void qdisc_list_del(struct Qdisc *q); |
89 | extern struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle); | 89 | struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle); |
90 | extern struct Qdisc *qdisc_lookup_class(struct net_device *dev, u32 handle); | 90 | struct Qdisc *qdisc_lookup_class(struct net_device *dev, u32 handle); |
91 | extern struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, | 91 | struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, |
92 | struct nlattr *tab); | 92 | struct nlattr *tab); |
93 | extern void qdisc_put_rtab(struct qdisc_rate_table *tab); | 93 | void qdisc_put_rtab(struct qdisc_rate_table *tab); |
94 | extern void qdisc_put_stab(struct qdisc_size_table *tab); | 94 | void qdisc_put_stab(struct qdisc_size_table *tab); |
95 | extern void qdisc_warn_nonwc(char *txt, struct Qdisc *qdisc); | 95 | void qdisc_warn_nonwc(char *txt, struct Qdisc *qdisc); |
96 | extern int sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q, | 96 | int sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q, |
97 | struct net_device *dev, struct netdev_queue *txq, | 97 | struct net_device *dev, struct netdev_queue *txq, |
98 | spinlock_t *root_lock); | 98 | spinlock_t *root_lock); |
99 | 99 | ||
100 | extern void __qdisc_run(struct Qdisc *q); | 100 | void __qdisc_run(struct Qdisc *q); |
101 | 101 | ||
102 | static inline void qdisc_run(struct Qdisc *q) | 102 | static inline void qdisc_run(struct Qdisc *q) |
103 | { | 103 | { |
@@ -105,10 +105,10 @@ static inline void qdisc_run(struct Qdisc *q) | |||
105 | __qdisc_run(q); | 105 | __qdisc_run(q); |
106 | } | 106 | } |
107 | 107 | ||
108 | extern int tc_classify_compat(struct sk_buff *skb, const struct tcf_proto *tp, | 108 | int tc_classify_compat(struct sk_buff *skb, const struct tcf_proto *tp, |
109 | struct tcf_result *res); | ||
110 | extern int tc_classify(struct sk_buff *skb, const struct tcf_proto *tp, | ||
111 | struct tcf_result *res); | 109 | struct tcf_result *res); |
110 | int tc_classify(struct sk_buff *skb, const struct tcf_proto *tp, | ||
111 | struct tcf_result *res); | ||
112 | 112 | ||
113 | /* Calculate maximal size of packet seen by hard_start_xmit | 113 | /* Calculate maximal size of packet seen by hard_start_xmit |
114 | routine of this device. | 114 | routine of this device. |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 6eab63363e59..ffc9d883b163 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -350,30 +350,32 @@ qdisc_class_find(const struct Qdisc_class_hash *hash, u32 id) | |||
350 | return NULL; | 350 | return NULL; |
351 | } | 351 | } |
352 | 352 | ||
353 | extern int qdisc_class_hash_init(struct Qdisc_class_hash *); | 353 | int qdisc_class_hash_init(struct Qdisc_class_hash *); |
354 | extern void qdisc_class_hash_insert(struct Qdisc_class_hash *, struct Qdisc_class_common *); | 354 | void qdisc_class_hash_insert(struct Qdisc_class_hash *, |
355 | extern void qdisc_class_hash_remove(struct Qdisc_class_hash *, struct Qdisc_class_common *); | 355 | struct Qdisc_class_common *); |
356 | extern void qdisc_class_hash_grow(struct Qdisc *, struct Qdisc_class_hash *); | 356 | void qdisc_class_hash_remove(struct Qdisc_class_hash *, |
357 | extern void qdisc_class_hash_destroy(struct Qdisc_class_hash *); | 357 | struct Qdisc_class_common *); |
358 | 358 | void qdisc_class_hash_grow(struct Qdisc *, struct Qdisc_class_hash *); | |
359 | extern void dev_init_scheduler(struct net_device *dev); | 359 | void qdisc_class_hash_destroy(struct Qdisc_class_hash *); |
360 | extern void dev_shutdown(struct net_device *dev); | 360 | |
361 | extern void dev_activate(struct net_device *dev); | 361 | void dev_init_scheduler(struct net_device *dev); |
362 | extern void dev_deactivate(struct net_device *dev); | 362 | void dev_shutdown(struct net_device *dev); |
363 | extern void dev_deactivate_many(struct list_head *head); | 363 | void dev_activate(struct net_device *dev); |
364 | extern struct Qdisc *dev_graft_qdisc(struct netdev_queue *dev_queue, | 364 | void dev_deactivate(struct net_device *dev); |
365 | struct Qdisc *qdisc); | 365 | void dev_deactivate_many(struct list_head *head); |
366 | extern void qdisc_reset(struct Qdisc *qdisc); | 366 | struct Qdisc *dev_graft_qdisc(struct netdev_queue *dev_queue, |
367 | extern void qdisc_destroy(struct Qdisc *qdisc); | 367 | struct Qdisc *qdisc); |
368 | extern void qdisc_tree_decrease_qlen(struct Qdisc *qdisc, unsigned int n); | 368 | void qdisc_reset(struct Qdisc *qdisc); |
369 | extern struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue, | 369 | void qdisc_destroy(struct Qdisc *qdisc); |
370 | struct Qdisc_ops *ops); | 370 | void qdisc_tree_decrease_qlen(struct Qdisc *qdisc, unsigned int n); |
371 | extern struct Qdisc *qdisc_create_dflt(struct netdev_queue *dev_queue, | 371 | struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue, |
372 | struct Qdisc_ops *ops, u32 parentid); | 372 | struct Qdisc_ops *ops); |
373 | extern void __qdisc_calculate_pkt_len(struct sk_buff *skb, | 373 | struct Qdisc *qdisc_create_dflt(struct netdev_queue *dev_queue, |
374 | const struct qdisc_size_table *stab); | 374 | struct Qdisc_ops *ops, u32 parentid); |
375 | extern void tcf_destroy(struct tcf_proto *tp); | 375 | void __qdisc_calculate_pkt_len(struct sk_buff *skb, |
376 | extern void tcf_destroy_chain(struct tcf_proto **fl); | 376 | const struct qdisc_size_table *stab); |
377 | void tcf_destroy(struct tcf_proto *tp); | ||
378 | void tcf_destroy_chain(struct tcf_proto **fl); | ||
377 | 379 | ||
378 | /* Reset all TX qdiscs greater then index of a device. */ | 380 | /* Reset all TX qdiscs greater then index of a device. */ |
379 | static inline void qdisc_reset_all_tx_gt(struct net_device *dev, unsigned int i) | 381 | static inline void qdisc_reset_all_tx_gt(struct net_device *dev, unsigned int i) |
@@ -692,7 +694,8 @@ static inline u64 psched_l2t_ns(const struct psched_ratecfg *r, | |||
692 | return ((u64)(len + r->overhead) * r->mult) >> r->shift; | 694 | return ((u64)(len + r->overhead) * r->mult) >> r->shift; |
693 | } | 695 | } |
694 | 696 | ||
695 | extern void psched_ratecfg_precompute(struct psched_ratecfg *r, const struct tc_ratespec *conf); | 697 | void psched_ratecfg_precompute(struct psched_ratecfg *r, |
698 | const struct tc_ratespec *conf); | ||
696 | 699 | ||
697 | static inline void psched_ratecfg_getrate(struct tc_ratespec *res, | 700 | static inline void psched_ratecfg_getrate(struct tc_ratespec *res, |
698 | const struct psched_ratecfg *r) | 701 | const struct psched_ratecfg *r) |