Skip to content

Commit

Permalink
Add missing "static" to the local function
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
  • Loading branch information
robertbaldyga committed May 10, 2024
1 parent 578f4b6 commit 168ecd0
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/engine/engine_discard.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static void _ocf_discard_step_complete(struct ocf_request *req, int error)
_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;

Expand Down
3 changes: 2 additions & 1 deletion src/engine/engine_wi.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/

Expand All @@ -16,7 +17,7 @@
#define OCF_ENGINE_DEBUG_IO_NAME "wi"
#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);

Expand Down
2 changes: 1 addition & 1 deletion src/engine/engine_wo.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ static void _ocf_read_wo_core_complete(struct ocf_request *req, int error)
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);

Expand Down
7 changes: 4 additions & 3 deletions src/metadata/metadata_io.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "metadata.h"
Expand Down Expand Up @@ -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);
}

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;
ocf_cache_t cache = context->cache;
Expand Down Expand Up @@ -257,7 +258,7 @@ static int metadata_io_do(struct ocf_request *req)
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;

Expand Down Expand Up @@ -328,7 +329,7 @@ static void metadata_io_io_end(struct metadata_io_request *m_req, int error)
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;
ocf_cache_t cache = m_req->cache;
Expand Down
3 changes: 2 additions & 1 deletion src/metadata/metadata_raw.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright(c) 2012-2021 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/

Expand Down Expand Up @@ -189,7 +190,7 @@ static uint32_t _raw_ram_checksum(ocf_cache_t cache,
/*
* 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);

Expand Down
3 changes: 2 additions & 1 deletion src/metadata/metadata_raw_dynamic.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/

Expand Down Expand Up @@ -37,7 +38,7 @@
* 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;

Expand Down
8 changes: 4 additions & 4 deletions src/mngt/ocf_mngt_cache.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2023 Huawei Technologies
* Copyright(c) 2023-2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/

Expand Down Expand Up @@ -767,7 +767,7 @@ static void _ocf_mngt_load_init_structures(ocf_pipeline_t pipeline,
_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;
ocf_cache_t cache = context->cache;
Expand Down Expand Up @@ -1372,7 +1372,7 @@ static void _ocf_mngt_attach_init_services(ocf_pipeline_t pipeline,
_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 const_data_size;
Expand Down Expand Up @@ -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)
{
struct ocf_cache_standby_detach_context *context;
Expand Down
3 changes: 2 additions & 1 deletion src/mngt/ocf_mngt_flush.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/

Expand Down Expand Up @@ -460,7 +461,7 @@ static void _ocf_mngt_flush_container(
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;

Expand Down
2 changes: 1 addition & 1 deletion src/ocf_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ static int ocf_core_submit_io_fast(struct ocf_io *io, struct ocf_request *req,
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;
ocf_core_t core;
Expand Down
3 changes: 2 additions & 1 deletion src/ocf_seq_cutoff.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright(c) 2020-2021 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/

Expand Down Expand Up @@ -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);
}
Expand Down
5 changes: 3 additions & 2 deletions src/utils/utils_async_lock.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright(c) 2019-2021 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/

Expand All @@ -12,7 +13,7 @@ struct ocf_async_lock_waiter {
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)
{
ocf_async_lock_waiter_t iter, temp;
Expand All @@ -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)
{
ocf_async_lock_waiter_t iter, temp;
Expand Down
3 changes: 2 additions & 1 deletion src/utils/utils_rbtree.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright(c) 2020-2021 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/

Expand Down Expand Up @@ -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 *sibling;
Expand Down

0 comments on commit 168ecd0

Please sign in to comment.