From 0abb4dbbca17d33cb4b5d046596fd6153a3db326 Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Fri, 18 Jan 2019 10:16:17 +0100 Subject: [PATCH] Minor coding style fixes Signed-off-by: Robert Baldyga --- src/mngt/ocf_mngt_common.c | 4 ++-- src/ocf_trace.c | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/mngt/ocf_mngt_common.c b/src/mngt/ocf_mngt_common.c index aa40ad6..50aac4b 100644 --- a/src/mngt/ocf_mngt_common.c +++ b/src/mngt/ocf_mngt_common.c @@ -160,8 +160,8 @@ static int _ocf_cleaning_wait_for_finish(struct ocf_cache *cache, if (cleaning_active) return -EBUSY; - else - return 0; + + return 0; } void ocf_mngt_cache_put(ocf_cache_t cache) diff --git a/src/ocf_trace.c b/src/ocf_trace.c index fc92cea..ba1d764 100644 --- a/src/ocf_trace.c +++ b/src/ocf_trace.c @@ -82,9 +82,8 @@ int ocf_mngt_start_trace(ocf_cache_t cache, void *trace_ctx, OCF_CHECK_NULL(cache); - if (!trace_callback) { + if (!trace_callback) return -EINVAL; - } result = ocf_mngt_cache_lock(cache); if (result) @@ -150,10 +149,8 @@ int ocf_mngt_stop_trace(ocf_cache_t cache) cache->trace.trace_ctx = NULL; // Poll for all ongoing traces completion - while (ocf_is_trace_ongoing(cache)) { + while (ocf_is_trace_ongoing(cache)) env_msleep(20); - } - ocf_mngt_cache_unlock(cache); return result;