diff --git a/src/mngt/ocf_mngt_cache.c b/src/mngt/ocf_mngt_cache.c index 594bca4..98dc487 100644 --- a/src/mngt/ocf_mngt_cache.c +++ b/src/mngt/ocf_mngt_cache.c @@ -1149,7 +1149,7 @@ static void _ocf_mngt_attach_handle_error( env_vfree(cache->device); } -static int _ocf_mngt_cache_init(ocf_cache_t cache, +static void _ocf_mngt_cache_init(ocf_cache_t cache, struct ocf_cache_mngt_init_params *params) { int i; @@ -1173,8 +1173,6 @@ static int _ocf_mngt_cache_init(ocf_cache_t cache, __init_cores(cache); __init_metadata_version(cache); __init_partitions(cache); - - return 0; } static int _ocf_mngt_cache_start(ocf_ctx_t ctx, ocf_cache_t *cache, @@ -1213,9 +1211,7 @@ static int _ocf_mngt_cache_start(ocf_ctx_t ctx, ocf_cache_t *cache, ocf_log(ctx, log_debug, "Metadata initialized\n"); params.flags.metadata_inited = true; - result = _ocf_mngt_cache_init(*cache, ¶ms); - if (result) - goto _cache_mngt_init_instance_ERROR; + _ocf_mngt_cache_init(*cache, ¶ms); ocf_ctx_get(ctx); diff --git a/src/utils/utils_part.c b/src/utils/utils_part.c index 3da1869..31faab7 100644 --- a/src/utils/utils_part.c +++ b/src/utils/utils_part.c @@ -79,12 +79,10 @@ static int ocf_part_lst_cmp_valid(struct ocf_cache *cache, return v2 - v1; } -int ocf_part_init(struct ocf_cache *cache) +void ocf_part_init(struct ocf_cache *cache) { ocf_lst_init(cache, &cache->lst_part, OCF_IO_CLASS_MAX, ocf_part_lst_getter_valid, ocf_part_lst_cmp_valid); - - return 0; } void ocf_part_move(struct ocf_request *req) diff --git a/src/utils/utils_part.h b/src/utils/utils_part.h index 23f477f..c37684c 100644 --- a/src/utils/utils_part.h +++ b/src/utils/utils_part.h @@ -10,7 +10,7 @@ #include "../engine/cache_engine.h" #include "../metadata/metadata_partition.h" -int ocf_part_init(struct ocf_cache *cache); +void ocf_part_init(struct ocf_cache *cache); static inline bool ocf_part_is_valid(struct ocf_user_part *part) {