@@ -658,9 +658,7 @@ static int rds_init(void)
ret = rds_sysctl_init();
if (ret)
goto out_threads;
- ret = rds_stats_init();
- if (ret)
- goto out_sysctl;
+ rds_stats_init();
ret = proto_register(&rds_proto, 1);
if (ret)
goto out_stats;
@@ -677,7 +675,6 @@ static int rds_init(void)
proto_unregister(&rds_proto);
out_stats:
rds_stats_exit();
-out_sysctl:
rds_sysctl_exit();
out_threads:
rds_threads_exit();
@@ -870,7 +870,7 @@ DECLARE_PER_CPU_SHARED_ALIGNED(struct rds_statistics, rds_stats);
put_cpu(); \
} while (0)
#define rds_stats_add(member, count) rds_stats_add_which(rds_stats, member, count)
-int rds_stats_init(void);
+void rds_stats_init(void);
void rds_stats_exit(void);
void rds_stats_info_copy(struct rds_info_iterator *iter,
uint64_t *values, const char *const *names,
@@ -145,8 +145,7 @@ void rds_stats_exit(void)
rds_info_deregister_func(RDS_INFO_COUNTERS, rds_stats_info);
}
-int rds_stats_init(void)
+void rds_stats_init(void)
{
rds_info_register_func(RDS_INFO_COUNTERS, rds_stats_info);
- return 0;
}
In the function rds_stats_init, the returned value is always zero. As such, it is not necessary to check it. And change the return type to void. Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com> --- net/rds/af_rds.c | 5 +---- net/rds/rds.h | 2 +- net/rds/stats.c | 3 +-- 3 files changed, 3 insertions(+), 7 deletions(-)