drop extern from function prototypes
Subsystems (2)
cover drop extern from function prototypes
iproute2 uses kernel style guidelines
Stephen Hemminger (4):
ip: drop extern from function prototype
bridge: drop extern from function prototypes
genl: drop extern from function prototypes
tc: drop extern from function prototypes
bridge/br_common.h | 18 +++++++++--------- genl/genl_utils.h | 5 +++-- ip/ip_common.h | 2 +- tc/m_ematch.h | 35 +++++++++++++++-------------------- tc/m_pedit.h | 31 +++++++++++++++---------------- tc/tc_common.h | 30 +++++++++++++++--------------- tc/tc_red.h | 7 ++++--- 7 files changed, 62 insertions(+), 66 deletions(-)
Signature · 1 line
2.18.0
PATCH 1/4 ip: drop extern from function prototype
Signed-off-by Stephen Hemminger <[email protected]>
--- ip/ip_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ip/ip_common.h +1 -1
@@ -82,7 +82,7 @@ int do_netns(int argc, char **argv);int do_xfrm (int argc,char **argv);int do_ipl2tp (int argc,char **argv);int do_ipfou (int argc,char **argv); -extern int do_ipila (int argc,char **argv); +int do_ipila (int argc,char **argv);int do_tcp_metrics (int argc,char **argv);int do_ipnetconf (int argc,char **argv);int do_iptoken (int argc,char **argv);
Signature · 1 line
2.18.0
PATCH 2/4 bridge: drop extern from function prototypes
In reply to Stephen HemmingerSigned-off-by Stephen Hemminger <[email protected]>
--- bridge/br_common.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
bridge/br_common.h +9 -9
@@ -6,20 +6,20 @@#define MDB_RTR_RTA (r) \ ((struct rtattr *)(((char *)(r)) + RTA_ALIGN(sizeof(__u32)))) -extern void print_vlan_info (FILE *fp,struct rtattr *tb); -extern int print_linkinfo (const struct sockaddr_nl *who, +void print_vlan_info (FILE *fp,struct rtattr *tb); +int print_linkinfo (const struct sockaddr_nl *who,struct nlmsghdr *n,void *arg); -extern int print_fdb (const struct sockaddr_nl *who, +int print_fdb (const struct sockaddr_nl *who,struct nlmsghdr *n,void *arg); -extern int print_mdb (const struct sockaddr_nl *who, +int print_mdb (const struct sockaddr_nl *who,struct nlmsghdr *n,void *arg); -extern int do_fdb (int argc,char **argv); -extern int do_mdb (int argc,char **argv); -extern int do_monitor (int argc,char **argv); -extern int do_vlan (int argc,char **argv); -extern int do_link (int argc,char **argv); +int do_fdb (int argc,char **argv); +int do_mdb (int argc,char **argv); +int do_monitor (int argc,char **argv); +int do_vlan (int argc,char **argv); +int do_link (int argc,char **argv);extern int preferred_family;extern int show_stats;
Signature · 1 line
2.18.0
PATCH 3/4 genl: drop extern from function prototypes
In reply to Stephen HemmingerSigned-off-by Stephen Hemminger <[email protected]>
--- genl/genl_utils.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
genl/genl_utils.h +3 -2
@@ -10,9 +10,10 @@ struct genl_utilstruct genl_util *next;char name[16 ];int (*parse_genlopt)(struct genl_util *fu,int argc,char **argv); - int (*print_genlopt)(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); +int (*print_genlopt)(const struct sockaddr_nl *who, + struct nlmsghdr *n, void *arg); }; -extern int genl_ctrl_resolve_family (const char *family); +int genl_ctrl_resolve_family (const char *family);#endif
Signature · 1 line
2.18.0
PATCH 4/4 tc: drop extern from function prototypes
In reply to Stephen HemmingerSigned-off-by Stephen Hemminger <[email protected]>
--- tc/m_ematch.h | 35 +++++++++++++++-------------------- tc/m_pedit.h | 31 +++++++++++++++---------------- tc/tc_common.h | 30 +++++++++++++++--------------- tc/tc_red.h | 7 ++++--- 4 files changed, 49 insertions(+), 54 deletions(-)
tc/m_ematch.h +15 -20
@@ -12,17 +12,16 @@#define EMATCHKINDSIZ 16 -struct bstr -{ +struct bstr {char *data;unsigned int len;int quoted;struct bstr *next; }; -extern struct bstr *bstr_alloc (const char *text); +struct bstr *bstr_alloc (const char *text); -static inline struct bstr *bstr_new (char *data,unsigned int len) +static inline struct bstr *bstr_new (char *data,unsigned int len) {struct bstr *b =calloc (1 ,sizeof (*b));
@@ -35,7 +34,7 @@ static inline struct bstr * bstr_new(char *data, unsigned int len)return b; } -static inline int bstrcmp (struct bstr *b,const char *text) +static inline int bstrcmp (const struct bstr *b,const char *text) {int len =strlen (text);int d = b->len - len;
@@ -51,12 +50,10 @@ static inline struct bstr *bstr_next(struct bstr *b)return b->next; } -extern unsigned long bstrtoul (const struct bstr *b); -extern void bstr_print (FILE *fd,const struct bstr *b,int ascii); - +unsigned long bstrtoul (const struct bstr *b); +void bstr_print (FILE *fd,const struct bstr *b,int ascii); -struct ematch -{ +struct ematch {struct bstr *args;int index;int inverted;
@@ -66,7 +63,7 @@ struct ematchstruct ematch *next; }; -static inline struct ematch *new_ematch (struct bstr *args,int inverted) +static inline struct ematch *new_ematch (struct bstr *args,int inverted) {struct ematch *e =calloc (1 ,sizeof (*e));
@@ -79,14 +76,12 @@ static inline struct ematch * new_ematch(struct bstr *args, int inverted)return e; } -extern void print_ematch_tree (const struct ematch *tree); +void print_ematch_tree (const struct ematch *tree); - -struct ematch_util -{ +struct ematch_util {char kind[EMATCHKINDSIZ ];int kind_num; -int (*parse_eopt)(struct nlmsghdr *,struct tcf_ematch_hdr *, +int (*parse_eopt)(struct nlmsghdr *,struct tcf_ematch_hdr *,struct bstr *);int (*parse_eopt_argv)(struct nlmsghdr *,struct tcf_ematch_hdr *,int ,char **);
@@ -95,7 +90,7 @@ struct ematch_utilstruct ematch_util *next; }; -static inline int parse_layer (struct bstr *b) +static inline int parse_layer (const struct bstr *b) {if (*((char *) b->data) =='l' )return TCF_LAYER_LINK ;
@@ -107,9 +102,9 @@ static inline int parse_layer(struct bstr *b) return INT_MAX; } -extern int em_parse_error (int err,struct bstr *args,struct bstr *carg, +int em_parse_error (int err,struct bstr *args,struct bstr *carg,struct ematch_util *,char *fmt, ...); -extern int print_ematch (FILE *,const struct rtattr *); -extern int parse_ematch (int *,char ***,int ,struct nlmsghdr *); +int print_ematch (FILE *,const struct rtattr *); +int parse_ematch (int *,char ***,int ,struct nlmsghdr *);#endif
tc/m_pedit.h +15 -16
@@ -71,23 +71,22 @@ struct m_pedit_util { struct m_pedit_key *tkey); }; -extern int pack_key (struct m_pedit_sel *sel,struct m_pedit_key *tkey); -extern int pack_key32 (__u32 retain,struct m_pedit_sel *sel, -struct m_pedit_key *tkey); -extern int pack_key16 (__u32 retain,struct m_pedit_sel *sel, -struct m_pedit_key *tkey); -extern int pack_key8 (__u32 retain,struct m_pedit_sel *sel, +int pack_key (struct m_pedit_sel *sel,struct m_pedit_key *tkey); +int pack_key32 (__u32 retain,struct m_pedit_sel *sel, +struct m_pedit_key *tkey); +int pack_key16 (__u32 retain,struct m_pedit_sel *sel, +struct m_pedit_key *tkey); +int pack_key8 (__u32 retain,struct m_pedit_sel *sel,struct m_pedit_key *tkey); -extern int parse_val (int *argc_p,char ***argv_p,__u32 *val,int type); -extern int parse_cmd (int *argc_p,char ***argv_p,__u32 len,int type, -__u32 retain, -struct m_pedit_sel *sel,struct m_pedit_key *tkey); -extern int parse_offset (int *argc_p,char ***argv_p, -struct m_pedit_sel *sel,struct m_pedit_key *tkey); +int parse_val (int *argc_p,char ***argv_p,__u32 *val,int type); +int parse_cmd (int *argc_p,char ***argv_p,__u32 len,int type, +__u32 retain, +struct m_pedit_sel *sel,struct m_pedit_key *tkey); +int parse_offset (int *argc_p,char ***argv_p, +struct m_pedit_sel *sel,struct m_pedit_key *tkey);int parse_pedit (struct action_util *a,int *argc_p,char ***argv_p,int tca_id,struct nlmsghdr *n); -extern int print_pedit (struct action_util *au,FILE *f,struct rtattr *arg); -extern int pedit_print_xstats (struct action_util *au,FILE *f, -struct rtattr *xstats); - +int print_pedit (struct action_util *au,FILE *f,struct rtattr *arg); +int pedit_print_xstats (struct action_util *au,FILE *f, +struct rtattr *xstats);#endif
tc/tc_common.h +15 -15
@@ -5,26 +5,26 @@extern struct rtnl_handle rth; -extern int do_qdisc (int argc,char **argv); -extern int do_class (int argc,char **argv); -extern int do_filter (int argc,char **argv,void *buf,size_t buflen); -extern int do_chain (int argc,char **argv,void *buf,size_t buflen); -extern int do_action (int argc,char **argv,void *buf,size_t buflen); -extern int do_tcmonitor (int argc,char **argv); -extern int do_exec (int argc,char **argv); +int do_qdisc (int argc,char **argv); +int do_class (int argc,char **argv); +int do_filter (int argc,char **argv,void *buf,size_t buflen); +int do_chain (int argc,char **argv,void *buf,size_t buflen); +int do_action (int argc,char **argv,void *buf,size_t buflen); +int do_tcmonitor (int argc,char **argv); +int do_exec (int argc,char **argv); -extern int print_action (const struct sockaddr_nl *who,struct nlmsghdr *n,void *arg); -extern int print_filter (const struct sockaddr_nl *who,struct nlmsghdr *n,void *arg); -extern int print_qdisc (const struct sockaddr_nl *who,struct nlmsghdr *n,void *arg); -extern int print_class (const struct sockaddr_nl *who,struct nlmsghdr *n,void *arg); -extern void print_size_table (FILE *fp,const char *prefix,struct rtattr *rta); +int print_action (const struct sockaddr_nl *who,struct nlmsghdr *n,void *arg); +int print_filter (const struct sockaddr_nl *who,struct nlmsghdr *n,void *arg); +int print_qdisc (const struct sockaddr_nl *who,struct nlmsghdr *n,void *arg); +int print_class (const struct sockaddr_nl *who,struct nlmsghdr *n,void *arg); +void print_size_table (FILE *fp,const char *prefix,struct rtattr *rta);struct tc_estimator ; -extern int parse_estimator (int *p_argc,char ***p_argv,struct tc_estimator *est); +int parse_estimator (int *p_argc,char ***p_argv,struct tc_estimator *est);struct tc_sizespec ; -extern int parse_size_table (int *p_argc,char ***p_argv,struct tc_sizespec *s); -extern int check_size_table_opts (struct tc_sizespec *s); +int parse_size_table (int *p_argc,char ***p_argv,struct tc_sizespec *s); +int check_size_table_opts (struct tc_sizespec *s);extern int show_graph;extern bool use_names;
tc/tc_red.h +4 -3
@@ -2,8 +2,9 @@#ifndef _TC_RED_H_#define _TC_RED_H_ 1 -extern int tc_red_eval_P (unsigned qmin,unsigned qmax,double prob); -extern int tc_red_eval_ewma (unsigned qmin,unsigned burst,unsigned avpkt); -extern int tc_red_eval_idle_damping (int wlog,unsigned avpkt,unsigned bandwidth,__u8 *sbuf); +int tc_red_eval_P (unsigned qmin,unsigned qmax,double prob); +int tc_red_eval_ewma (unsigned qmin,unsigned burst,unsigned avpkt); +int tc_red_eval_idle_damping (int wlog,unsigned avpkt,unsigned bandwidth, +__u8 *sbuf);#endif
Signature · 1 line
2.18.0