diff options
author | Joe Perches <joe@perches.com> | 2013-09-22 13:32:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-09-23 01:51:09 -0400 |
commit | efb48ccfcda4dbb9fce39c5c8df19644a08121c0 (patch) | |
tree | a453c070525c92b393ff63171116ca3e572a0485 | |
parent | 2702c4bb89b2a9bfe49f3db77a1bac88d5c6404c (diff) |
rtnetlink.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>
-rw-r--r-- | include/net/rtnetlink.h | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h index 702664833a53..bb13a182fba6 100644 --- a/include/net/rtnetlink.h +++ b/include/net/rtnetlink.h | |||
@@ -8,14 +8,12 @@ typedef int (*rtnl_doit_func)(struct sk_buff *, struct nlmsghdr *); | |||
8 | typedef int (*rtnl_dumpit_func)(struct sk_buff *, struct netlink_callback *); | 8 | typedef int (*rtnl_dumpit_func)(struct sk_buff *, struct netlink_callback *); |
9 | typedef u16 (*rtnl_calcit_func)(struct sk_buff *, struct nlmsghdr *); | 9 | typedef u16 (*rtnl_calcit_func)(struct sk_buff *, struct nlmsghdr *); |
10 | 10 | ||
11 | extern int __rtnl_register(int protocol, int msgtype, | 11 | int __rtnl_register(int protocol, int msgtype, |
12 | rtnl_doit_func, rtnl_dumpit_func, | 12 | rtnl_doit_func, rtnl_dumpit_func, rtnl_calcit_func); |
13 | rtnl_calcit_func); | 13 | void rtnl_register(int protocol, int msgtype, |
14 | extern void rtnl_register(int protocol, int msgtype, | 14 | rtnl_doit_func, rtnl_dumpit_func, rtnl_calcit_func); |
15 | rtnl_doit_func, rtnl_dumpit_func, | 15 | int rtnl_unregister(int protocol, int msgtype); |
16 | rtnl_calcit_func); | 16 | void rtnl_unregister_all(int protocol); |
17 | extern int rtnl_unregister(int protocol, int msgtype); | ||
18 | extern void rtnl_unregister_all(int protocol); | ||
19 | 17 | ||
20 | static inline int rtnl_msg_family(const struct nlmsghdr *nlh) | 18 | static inline int rtnl_msg_family(const struct nlmsghdr *nlh) |
21 | { | 19 | { |
@@ -83,11 +81,11 @@ struct rtnl_link_ops { | |||
83 | unsigned int (*get_num_rx_queues)(void); | 81 | unsigned int (*get_num_rx_queues)(void); |
84 | }; | 82 | }; |
85 | 83 | ||
86 | extern int __rtnl_link_register(struct rtnl_link_ops *ops); | 84 | int __rtnl_link_register(struct rtnl_link_ops *ops); |
87 | extern void __rtnl_link_unregister(struct rtnl_link_ops *ops); | 85 | void __rtnl_link_unregister(struct rtnl_link_ops *ops); |
88 | 86 | ||
89 | extern int rtnl_link_register(struct rtnl_link_ops *ops); | 87 | int rtnl_link_register(struct rtnl_link_ops *ops); |
90 | extern void rtnl_link_unregister(struct rtnl_link_ops *ops); | 88 | void rtnl_link_unregister(struct rtnl_link_ops *ops); |
91 | 89 | ||
92 | /** | 90 | /** |
93 | * struct rtnl_af_ops - rtnetlink address family operations | 91 | * struct rtnl_af_ops - rtnetlink address family operations |
@@ -117,18 +115,18 @@ struct rtnl_af_ops { | |||
117 | const struct nlattr *attr); | 115 | const struct nlattr *attr); |
118 | }; | 116 | }; |
119 | 117 | ||
120 | extern int __rtnl_af_register(struct rtnl_af_ops *ops); | 118 | int __rtnl_af_register(struct rtnl_af_ops *ops); |
121 | extern void __rtnl_af_unregister(struct rtnl_af_ops *ops); | 119 | void __rtnl_af_unregister(struct rtnl_af_ops *ops); |
122 | 120 | ||
123 | extern int rtnl_af_register(struct rtnl_af_ops *ops); | 121 | int rtnl_af_register(struct rtnl_af_ops *ops); |
124 | extern void rtnl_af_unregister(struct rtnl_af_ops *ops); | 122 | void rtnl_af_unregister(struct rtnl_af_ops *ops); |
125 | 123 | ||
124 | struct net *rtnl_link_get_net(struct net *src_net, struct nlattr *tb[]); | ||
125 | struct net_device *rtnl_create_link(struct net *net, char *ifname, | ||
126 | const struct rtnl_link_ops *ops, | ||
127 | struct nlattr *tb[]); | ||
128 | int rtnl_configure_link(struct net_device *dev, const struct ifinfomsg *ifm); | ||
126 | 129 | ||
127 | extern struct net *rtnl_link_get_net(struct net *src_net, struct nlattr *tb[]); | ||
128 | extern struct net_device *rtnl_create_link(struct net *net, | ||
129 | char *ifname, const struct rtnl_link_ops *ops, struct nlattr *tb[]); | ||
130 | extern int rtnl_configure_link(struct net_device *dev, | ||
131 | const struct ifinfomsg *ifm); | ||
132 | extern const struct nla_policy ifla_policy[IFLA_MAX+1]; | 130 | extern const struct nla_policy ifla_policy[IFLA_MAX+1]; |
133 | 131 | ||
134 | #define MODULE_ALIAS_RTNL_LINK(kind) MODULE_ALIAS("rtnl-link-" kind) | 132 | #define MODULE_ALIAS_RTNL_LINK(kind) MODULE_ALIAS("rtnl-link-" kind) |