Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nf_tables*.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: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Joe Perches and committed by
David S. Miller
5eccdfaa c68c7f5a

+40 -43
+26 -29
include/net/netfilter/nf_tables.h
··· 91 91 unsigned int len; 92 92 }; 93 93 94 - extern int nft_data_init(const struct nft_ctx *ctx, struct nft_data *data, 95 - struct nft_data_desc *desc, const struct nlattr *nla); 96 - extern void nft_data_uninit(const struct nft_data *data, 97 - enum nft_data_types type); 98 - extern int nft_data_dump(struct sk_buff *skb, int attr, 99 - const struct nft_data *data, 100 - enum nft_data_types type, unsigned int len); 94 + int nft_data_init(const struct nft_ctx *ctx, struct nft_data *data, 95 + struct nft_data_desc *desc, const struct nlattr *nla); 96 + void nft_data_uninit(const struct nft_data *data, enum nft_data_types type); 97 + int nft_data_dump(struct sk_buff *skb, int attr, const struct nft_data *data, 98 + enum nft_data_types type, unsigned int len); 101 99 102 100 static inline enum nft_data_types nft_dreg_to_type(enum nft_registers reg) 103 101 { ··· 107 109 return type == NFT_DATA_VERDICT ? NFT_REG_VERDICT : NFT_REG_1; 108 110 } 109 111 110 - extern int nft_validate_input_register(enum nft_registers reg); 111 - extern int nft_validate_output_register(enum nft_registers reg); 112 - extern int nft_validate_data_load(const struct nft_ctx *ctx, 113 - enum nft_registers reg, 114 - const struct nft_data *data, 115 - enum nft_data_types type); 112 + int nft_validate_input_register(enum nft_registers reg); 113 + int nft_validate_output_register(enum nft_registers reg); 114 + int nft_validate_data_load(const struct nft_ctx *ctx, enum nft_registers reg, 115 + const struct nft_data *data, 116 + enum nft_data_types type); 116 117 117 118 /** 118 119 * struct nft_set_elem - generic representation of set elements ··· 180 183 u32 features; 181 184 }; 182 185 183 - extern int nft_register_set(struct nft_set_ops *ops); 184 - extern void nft_unregister_set(struct nft_set_ops *ops); 186 + int nft_register_set(struct nft_set_ops *ops); 187 + void nft_unregister_set(struct nft_set_ops *ops); 185 188 186 189 /** 187 190 * struct nft_set - nf_tables set instance ··· 217 220 return (void *)set->data; 218 221 } 219 222 220 - extern struct nft_set *nf_tables_set_lookup(const struct nft_table *table, 221 - const struct nlattr *nla); 223 + struct nft_set *nf_tables_set_lookup(const struct nft_table *table, 224 + const struct nlattr *nla); 222 225 223 226 /** 224 227 * struct nft_set_binding - nf_tables set binding ··· 234 237 const struct nft_chain *chain; 235 238 }; 236 239 237 - extern int nf_tables_bind_set(const struct nft_ctx *ctx, struct nft_set *set, 238 - struct nft_set_binding *binding); 239 - extern void nf_tables_unbind_set(const struct nft_ctx *ctx, struct nft_set *set, 240 - struct nft_set_binding *binding); 240 + int nf_tables_bind_set(const struct nft_ctx *ctx, struct nft_set *set, 241 + struct nft_set_binding *binding); 242 + void nf_tables_unbind_set(const struct nft_ctx *ctx, struct nft_set *set, 243 + struct nft_set_binding *binding); 241 244 242 245 243 246 /** ··· 443 446 return container_of(chain, struct nft_base_chain, chain); 444 447 } 445 448 446 - extern unsigned int nft_do_chain_pktinfo(struct nft_pktinfo *pkt, 447 - const struct nf_hook_ops *ops); 449 + unsigned int nft_do_chain_pktinfo(struct nft_pktinfo *pkt, 450 + const struct nf_hook_ops *ops); 448 451 449 452 /** 450 453 * struct nft_table - nf_tables table ··· 486 489 nf_hookfn *hooks[NF_MAX_HOOKS]; 487 490 }; 488 491 489 - extern int nft_register_afinfo(struct net *, struct nft_af_info *); 490 - extern void nft_unregister_afinfo(struct nft_af_info *); 492 + int nft_register_afinfo(struct net *, struct nft_af_info *); 493 + void nft_unregister_afinfo(struct nft_af_info *); 491 494 492 495 struct nf_chain_type { 493 496 unsigned int hook_mask; ··· 498 501 int family; 499 502 }; 500 503 501 - extern int nft_register_chain_type(struct nf_chain_type *); 502 - extern void nft_unregister_chain_type(struct nf_chain_type *); 504 + int nft_register_chain_type(struct nf_chain_type *); 505 + void nft_unregister_chain_type(struct nf_chain_type *); 503 506 504 - extern int nft_register_expr(struct nft_expr_type *); 505 - extern void nft_unregister_expr(struct nft_expr_type *); 507 + int nft_register_expr(struct nft_expr_type *); 508 + void nft_unregister_expr(struct nft_expr_type *); 506 509 507 510 #define MODULE_ALIAS_NFT_FAMILY(family) \ 508 511 MODULE_ALIAS("nft-afinfo-" __stringify(family))
+14 -14
include/net/netfilter/nf_tables_core.h
··· 1 1 #ifndef _NET_NF_TABLES_CORE_H 2 2 #define _NET_NF_TABLES_CORE_H 3 3 4 - extern int nf_tables_core_module_init(void); 5 - extern void nf_tables_core_module_exit(void); 4 + int nf_tables_core_module_init(void); 5 + void nf_tables_core_module_exit(void); 6 6 7 - extern int nft_immediate_module_init(void); 8 - extern void nft_immediate_module_exit(void); 7 + int nft_immediate_module_init(void); 8 + void nft_immediate_module_exit(void); 9 9 10 10 struct nft_cmp_fast_expr { 11 11 u32 data; ··· 15 15 16 16 extern const struct nft_expr_ops nft_cmp_fast_ops; 17 17 18 - extern int nft_cmp_module_init(void); 19 - extern void nft_cmp_module_exit(void); 18 + int nft_cmp_module_init(void); 19 + void nft_cmp_module_exit(void); 20 20 21 - extern int nft_lookup_module_init(void); 22 - extern void nft_lookup_module_exit(void); 21 + int nft_lookup_module_init(void); 22 + void nft_lookup_module_exit(void); 23 23 24 - extern int nft_bitwise_module_init(void); 25 - extern void nft_bitwise_module_exit(void); 24 + int nft_bitwise_module_init(void); 25 + void nft_bitwise_module_exit(void); 26 26 27 - extern int nft_byteorder_module_init(void); 28 - extern void nft_byteorder_module_exit(void); 27 + int nft_byteorder_module_init(void); 28 + void nft_byteorder_module_exit(void); 29 29 30 30 struct nft_payload { 31 31 enum nft_payload_bases base:8; ··· 36 36 37 37 extern const struct nft_expr_ops nft_payload_fast_ops; 38 38 39 - extern int nft_payload_module_init(void); 40 - extern void nft_payload_module_exit(void); 39 + int nft_payload_module_init(void); 40 + void nft_payload_module_exit(void); 41 41 42 42 #endif /* _NET_NF_TABLES_CORE_H */