diff options
author | stephen hemminger <stephen@networkplumber.org> | 2013-12-30 10:41:32 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-01 23:42:19 -0500 |
commit | 3678a9d86324e457d0ff9d898747ee7e787f4bb8 (patch) | |
tree | a32a9a46e4e5f891b10a82fb53c03586fa2f164b /net/core | |
parent | 47d1f71f56bd397bfa09c6b2a595991d1dd9c489 (diff) | |
download | linux-3678a9d86324e457d0ff9d898747ee7e787f4bb8.tar.gz linux-3678a9d86324e457d0ff9d898747ee7e787f4bb8.tar.bz2 linux-3678a9d86324e457d0ff9d898747ee7e787f4bb8.zip |
netlink: cleanup rntl_af_register
The function __rtnl_af_register is never called outside this
code, and the return value is always 0.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/rtnetlink.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index cf67144d3e3c..e6e7d582f901 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -403,34 +403,16 @@ static const struct rtnl_af_ops *rtnl_af_lookup(const int family) } /** - * __rtnl_af_register - Register rtnl_af_ops with rtnetlink. - * @ops: struct rtnl_af_ops * to register - * - * The caller must hold the rtnl_mutex. - * - * Returns 0 on success or a negative error code. - */ -int __rtnl_af_register(struct rtnl_af_ops *ops) -{ - list_add_tail(&ops->list, &rtnl_af_ops); - return 0; -} -EXPORT_SYMBOL_GPL(__rtnl_af_register); - -/** * rtnl_af_register - Register rtnl_af_ops with rtnetlink. * @ops: struct rtnl_af_ops * to register * * Returns 0 on success or a negative error code. */ -int rtnl_af_register(struct rtnl_af_ops *ops) +void rtnl_af_register(struct rtnl_af_ops *ops) { - int err; - rtnl_lock(); - err = __rtnl_af_register(ops); + list_add_tail(&ops->list, &rtnl_af_ops); rtnl_unlock(); - return err; } EXPORT_SYMBOL_GPL(rtnl_af_register); |