Add missing "static" to the local function

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
This commit is contained in:
Robert Baldyga 2024-05-11 00:03:26 +02:00
parent 578f4b6591
commit 168ecd0075
12 changed files with 26 additions and 18 deletions

View File

@ -136,7 +136,7 @@ static void _ocf_discard_step_complete(struct ocf_request *req, int error)
_ocf_discard_finish_step(req); _ocf_discard_finish_step(req);
} }
int _ocf_discard_step_do(struct ocf_request *req) static int _ocf_discard_step_do(struct ocf_request *req)
{ {
struct ocf_cache *cache = req->cache; struct ocf_cache *cache = req->cache;

View File

@ -1,5 +1,6 @@
/* /*
* Copyright(c) 2012-2022 Intel Corporation * Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -16,7 +17,7 @@
#define OCF_ENGINE_DEBUG_IO_NAME "wi" #define OCF_ENGINE_DEBUG_IO_NAME "wi"
#include "engine_debug.h" #include "engine_debug.h"
int _ocf_write_wi_next_pass(struct ocf_request *req) static int _ocf_write_wi_next_pass(struct ocf_request *req)
{ {
ocf_req_unlock_wr(ocf_cache_line_concurrency(req->cache), req); ocf_req_unlock_wr(ocf_cache_line_concurrency(req->cache), req);

View File

@ -174,7 +174,7 @@ static void _ocf_read_wo_core_complete(struct ocf_request *req, int error)
ocf_engine_push_req_front(req, true); ocf_engine_push_req_front(req, true);
} }
int ocf_read_wo_do(struct ocf_request *req) static int ocf_read_wo_do(struct ocf_request *req)
{ {
ocf_req_get(req); ocf_req_get(req);

View File

@ -1,5 +1,6 @@
/* /*
* Copyright(c) 2012-2022 Intel Corporation * Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include "metadata.h" #include "metadata.h"
@ -97,7 +98,7 @@ static void metadata_io_read_i_atomic_step_end(struct ocf_io *io, int error)
metadata_io_read_i_atomic_complete(context, 0); metadata_io_read_i_atomic_complete(context, 0);
} }
int metadata_io_read_i_atomic_step(struct ocf_request *req) static int metadata_io_read_i_atomic_step(struct ocf_request *req)
{ {
struct metadata_io_read_i_atomic_context *context = req->priv; struct metadata_io_read_i_atomic_context *context = req->priv;
ocf_cache_t cache = context->cache; ocf_cache_t cache = context->cache;
@ -257,7 +258,7 @@ static int metadata_io_do(struct ocf_request *req)
return 0; return 0;
} }
void metadata_io_req_finalize(struct metadata_io_request *m_req) static void metadata_io_req_finalize(struct metadata_io_request *m_req)
{ {
struct metadata_io_request_asynch *a_req = m_req->asynch; struct metadata_io_request_asynch *a_req = m_req->asynch;
@ -328,7 +329,7 @@ static void metadata_io_io_end(struct metadata_io_request *m_req, int error)
metadata_io_req_complete(m_req); metadata_io_req_complete(m_req);
} }
void metadata_io_req_end(struct metadata_io_request *m_req) static void metadata_io_req_end(struct metadata_io_request *m_req)
{ {
struct metadata_io_request_asynch *a_req = m_req->asynch; struct metadata_io_request_asynch *a_req = m_req->asynch;
ocf_cache_t cache = m_req->cache; ocf_cache_t cache = m_req->cache;

View File

@ -1,5 +1,6 @@
/* /*
* Copyright(c) 2012-2021 Intel Corporation * Copyright(c) 2012-2021 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -189,7 +190,7 @@ static uint32_t _raw_ram_checksum(ocf_cache_t cache,
/* /*
* RAM Implementation - Entry page number * RAM Implementation - Entry page number
*/ */
uint32_t _raw_ram_page(struct ocf_metadata_raw *raw, uint32_t entry) static uint32_t _raw_ram_page(struct ocf_metadata_raw *raw, uint32_t entry)
{ {
ENV_BUG_ON(entry >= raw->entries); ENV_BUG_ON(entry >= raw->entries);

View File

@ -1,5 +1,6 @@
/* /*
* Copyright(c) 2012-2022 Intel Corporation * Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -37,7 +38,7 @@
* Check if page is valid for specified RAW descriptor * Check if page is valid for specified RAW descriptor
*/ */
uint32_t raw_dynamic_segment_size_on_ssd(struct ocf_metadata_raw *raw) static uint32_t raw_dynamic_segment_size_on_ssd(struct ocf_metadata_raw *raw)
{ {
const size_t alignment = 128 * KiB / PAGE_SIZE; const size_t alignment = 128 * KiB / PAGE_SIZE;

View File

@ -1,6 +1,6 @@
/* /*
* Copyright(c) 2012-2022 Intel Corporation * Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2023 Huawei Technologies * Copyright(c) 2023-2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -767,7 +767,7 @@ static void _ocf_mngt_load_init_structures(ocf_pipeline_t pipeline,
_ocf_mngt_init_metadata_complete, context, false); _ocf_mngt_init_metadata_complete, context, false);
} }
void _ocf_mngt_load_metadata_complete(void *priv, int error) static void _ocf_mngt_load_metadata_complete(void *priv, int error)
{ {
struct ocf_cache_attach_context *context = priv; struct ocf_cache_attach_context *context = priv;
ocf_cache_t cache = context->cache; ocf_cache_t cache = context->cache;
@ -1372,7 +1372,7 @@ static void _ocf_mngt_attach_init_services(ocf_pipeline_t pipeline,
_ocf_mngt_cleaning_populate_init_complete, context); _ocf_mngt_cleaning_populate_init_complete, context);
} }
uint64_t _ocf_mngt_calculate_ram_needed(ocf_cache_line_size_t line_size, static uint64_t _ocf_mngt_calculate_ram_needed(ocf_cache_line_size_t line_size,
uint64_t volume_size) uint64_t volume_size)
{ {
uint64_t const_data_size; uint64_t const_data_size;
@ -2849,7 +2849,7 @@ _ocf_mngt_cache_standby_detach_pipeline_properties = {
}, },
}; };
void _ocf_mngt_cache_standby_detach(ocf_cache_t cache, static void _ocf_mngt_cache_standby_detach(ocf_cache_t cache,
ocf_mngt_cache_standby_detach_end_t cmpl, void *priv) ocf_mngt_cache_standby_detach_end_t cmpl, void *priv)
{ {
struct ocf_cache_standby_detach_context *context; struct ocf_cache_standby_detach_context *context;

View File

@ -1,5 +1,6 @@
/* /*
* Copyright(c) 2012-2022 Intel Corporation * Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -460,7 +461,7 @@ finish:
end(context); end(context);
} }
void _ocf_flush_container_complete(void *ctx) static void _ocf_flush_container_complete(void *ctx)
{ {
struct ocf_mngt_cache_flush_context *context = ctx; struct ocf_mngt_cache_flush_context *context = ctx;

View File

@ -255,7 +255,7 @@ static int ocf_core_submit_io_fast(struct ocf_io *io, struct ocf_request *req,
return -OCF_ERR_IO; return -OCF_ERR_IO;
} }
void ocf_core_volume_submit_io(struct ocf_io *io) static void ocf_core_volume_submit_io(struct ocf_io *io)
{ {
struct ocf_request *req; struct ocf_request *req;
ocf_core_t core; ocf_core_t core;

View File

@ -1,5 +1,6 @@
/* /*
* Copyright(c) 2020-2021 Intel Corporation * Copyright(c) 2020-2021 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -92,7 +93,7 @@ static void ocf_seq_cutoff_base_init(struct ocf_seq_cutoff *base, int nstreams)
} }
} }
void ocf_seq_cutoff_base_deinit(struct ocf_seq_cutoff *base) static void ocf_seq_cutoff_base_deinit(struct ocf_seq_cutoff *base)
{ {
env_rwlock_destroy(&base->lock); env_rwlock_destroy(&base->lock);
} }

View File

@ -1,5 +1,6 @@
/* /*
* Copyright(c) 2019-2021 Intel Corporation * Copyright(c) 2019-2021 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -12,7 +13,7 @@ struct ocf_async_lock_waiter {
ocf_async_lock_end_t cmpl; ocf_async_lock_end_t cmpl;
}; };
void _ocf_async_lock_collect_waiters(ocf_async_lock_t lock, static void _ocf_async_lock_collect_waiters(ocf_async_lock_t lock,
struct list_head *waiters) struct list_head *waiters)
{ {
ocf_async_lock_waiter_t iter, temp; ocf_async_lock_waiter_t iter, temp;
@ -31,7 +32,7 @@ void _ocf_async_lock_collect_waiters(ocf_async_lock_t lock,
} }
} }
void _ocf_async_lock_run_waiters(struct ocf_async_lock *lock, static void _ocf_async_lock_run_waiters(struct ocf_async_lock *lock,
struct list_head *waiters, int status) struct list_head *waiters, int status)
{ {
ocf_async_lock_waiter_t iter, temp; ocf_async_lock_waiter_t iter, temp;

View File

@ -1,5 +1,6 @@
/* /*
* Copyright(c) 2020-2021 Intel Corporation * Copyright(c) 2020-2021 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -276,7 +277,7 @@ static struct ocf_rb_node *ocf_rb_tree_sibling(struct ocf_rb_node *node)
} }
void ocf_rb_tree_fix_double_black(struct ocf_rb_tree *tree, static void ocf_rb_tree_fix_double_black(struct ocf_rb_tree *tree,
struct ocf_rb_node *node) struct ocf_rb_node *node)
{ {
struct ocf_rb_node *sibling; struct ocf_rb_node *sibling;