Add missing "static" to the local functions

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
This commit is contained in:
Robert Baldyga 2024-05-11 00:29:56 +02:00
parent 7dd5fa8029
commit 5c4b5634cb
8 changed files with 21 additions and 23 deletions

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
*/ */
@ -865,7 +866,7 @@ static void cas_set_classifier(ocf_cache_t cache,
cache_priv->classifier = cls; cache_priv->classifier = cls;
} }
void _cas_cls_rule_destroy(struct cas_classifier *cls, static void _cas_cls_rule_destroy(struct cas_classifier *cls,
struct cas_cls_rule *r) struct cas_cls_rule *r)
{ {
struct list_head *item, *n; struct list_head *item, *n;

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
*/ */
@ -52,7 +53,7 @@ static void _cas_page_set_cpu(struct page *page, int cpu)
page->private = cpu; page->private = cpu;
} }
void *_cas_alloc_page_rpool(void *allocator_ctx, int cpu) static void *_cas_alloc_page_rpool(void *allocator_ctx, int cpu)
{ {
struct page *page; struct page *page;
@ -81,7 +82,7 @@ static int _cas_page_get_cpu(struct page *page)
/* /*
* *
*/ */
ctx_data_t *__cas_ctx_data_alloc(uint32_t pages, bool zalloc) static ctx_data_t *__cas_ctx_data_alloc(uint32_t pages, bool zalloc)
{ {
struct blk_data *data; struct blk_data *data;
uint32_t i; uint32_t i;

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
*/ */
@ -1051,7 +1052,7 @@ struct get_paths_ctx {
int position; int position;
}; };
int _cache_mngt_core_pool_get_paths_visitor(ocf_uuid_t uuid, void *ctx) static int _cache_mngt_core_pool_get_paths_visitor(ocf_uuid_t uuid, void *ctx)
{ {
struct get_paths_ctx *visitor_ctx = ctx; struct get_paths_ctx *visitor_ctx = ctx;
@ -2222,7 +2223,7 @@ static int _cache_start_finalize(ocf_cache_t cache, int init_mode,
return 0; return 0;
} }
int cache_mngt_check_bdev(struct ocf_mngt_cache_device_config *device_cfg, static int cache_mngt_check_bdev(struct ocf_mngt_cache_device_config *cfg,
bool force) bool force)
{ {
char holder[] = "CAS START\n"; char holder[] = "CAS START\n";
@ -2675,7 +2676,7 @@ out:
* nonzero exit code means failure * nonzero exit code means failure
*/ */
int cache_mngt_set_seq_cutoff_promotion_count(ocf_cache_t cache, static int cache_mngt_set_seq_cutoff_promotion_count(ocf_cache_t cache,
ocf_core_t core, uint32_t count) ocf_core_t core, uint32_t count)
{ {
int result; int result;
@ -2757,7 +2758,7 @@ int cache_mngt_get_seq_cutoff_policy(ocf_core_t core,
* nonzero exit code means failure * nonzero exit code means failure
*/ */
int cache_mngt_get_seq_cutoff_promotion_count(ocf_core_t core, static int cache_mngt_get_seq_cutoff_promotion_count(ocf_core_t core,
uint32_t *count) uint32_t *count)
{ {
ocf_cache_t cache = ocf_core_get_cache(core); ocf_cache_t cache = ocf_core_get_cache(core);

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
*/ */
@ -62,7 +63,7 @@ struct _cas_rpool_pre_alloc_info {
(struct list_head *)((unsigned long)entry + rpool->entry_size \ (struct list_head *)((unsigned long)entry + rpool->entry_size \
- sizeof(struct list_head)) - sizeof(struct list_head))
void _cas_rpool_pre_alloc_do(struct work_struct *ws) static void _cas_rpool_pre_alloc_do(struct work_struct *ws)
{ {
struct _cas_rpool_pre_alloc_info *info = struct _cas_rpool_pre_alloc_info *info =
container_of(ws, struct _cas_rpool_pre_alloc_info, ws); container_of(ws, struct _cas_rpool_pre_alloc_info, ws);

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
*/ */
@ -256,7 +257,7 @@ void cas_blk_close_volume(ocf_volume_t vol)
env_free(vol); env_free(vol);
} }
int _cas_blk_identify_type(const char *path, uint8_t *type) static int _cas_blk_identify_type(const char *path, uint8_t *type)
{ {
struct file *file; struct file *file;
int result = 0; int result = 0;

View File

@ -24,7 +24,7 @@
#define CAS_DEBUG_PARAM(format, ...) #define CAS_DEBUG_PARAM(format, ...)
#endif #endif
int block_dev_open_object(ocf_volume_t vol, void *volume_params) static int block_dev_open_object(ocf_volume_t vol, void *volume_params)
{ {
struct bd_object *bdobj = bd_object(vol); struct bd_object *bdobj = bd_object(vol);
const struct ocf_volume_uuid *uuid = ocf_volume_get_uuid(vol); const struct ocf_volume_uuid *uuid = ocf_volume_get_uuid(vol);
@ -51,7 +51,7 @@ int block_dev_open_object(ocf_volume_t vol, void *volume_params)
return 0; return 0;
} }
void block_dev_close_object(ocf_volume_t vol) static void block_dev_close_object(ocf_volume_t vol)
{ {
struct bd_object *bdobj = bd_object(vol); struct bd_object *bdobj = bd_object(vol);
@ -61,7 +61,7 @@ void block_dev_close_object(ocf_volume_t vol)
cas_disk_close(bdobj->dsk); cas_disk_close(bdobj->dsk);
} }
unsigned int block_dev_get_max_io_size(ocf_volume_t vol) static unsigned int block_dev_get_max_io_size(ocf_volume_t vol)
{ {
struct bd_object *bdobj = bd_object(vol); struct bd_object *bdobj = bd_object(vol);
struct block_device *bd = bdobj->btm_bd; struct block_device *bd = bdobj->btm_bd;
@ -69,7 +69,7 @@ unsigned int block_dev_get_max_io_size(ocf_volume_t vol)
return queue_max_sectors(bd->bd_disk->queue) << SECTOR_SHIFT; return queue_max_sectors(bd->bd_disk->queue) << SECTOR_SHIFT;
} }
uint64_t block_dev_get_byte_length(ocf_volume_t vol) static uint64_t block_dev_get_byte_length(ocf_volume_t vol)
{ {
struct bd_object *bdobj = bd_object(vol); struct bd_object *bdobj = bd_object(vol);
struct block_device *bd = bdobj->btm_bd; struct block_device *bd = bdobj->btm_bd;
@ -198,7 +198,7 @@ out:
cas_bd_io_end(io, blkio->error); cas_bd_io_end(io, blkio->error);
} }
void block_dev_submit_discard(struct ocf_io *io) static void block_dev_submit_discard(struct ocf_io *io)
{ {
struct blkio *blkio = cas_io_to_blkio(io); struct blkio *blkio = cas_io_to_blkio(io);
struct bd_object *bdobj = bd_object(ocf_io_get_volume(io)); struct bd_object *bdobj = bd_object(ocf_io_get_volume(io));

View File

@ -1,19 +1,12 @@
/* /*
* 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
*/ */
#ifndef __VOL_BLOCK_DEV_BOTTOM_H__ #ifndef __VOL_BLOCK_DEV_BOTTOM_H__
#define __VOL_BLOCK_DEV_BOTTOM_H__ #define __VOL_BLOCK_DEV_BOTTOM_H__
#include "../cas_cache.h"
int block_dev_open_object(ocf_volume_t vol, void *volume_params);
void block_dev_close_object(ocf_volume_t vol);
int block_dev_try_get_io_class(struct bio *bio, int *io_class);
int block_dev_init(void); int block_dev_init(void);
#endif /* __VOL_BLOCK_DEV_BOTTOM_H__ */ #endif /* __VOL_BLOCK_DEV_BOTTOM_H__ */

View File

@ -31,7 +31,7 @@ static void blkdev_set_bio_data(struct blk_data *data, struct bio *bio)
#endif #endif
} }
void blkdev_set_exported_object_flush_fua(ocf_core_t core) static void blkdev_set_exported_object_flush_fua(ocf_core_t core)
{ {
ocf_cache_t cache = ocf_core_get_cache(core); ocf_cache_t cache = ocf_core_get_cache(core);
ocf_volume_t core_vol = ocf_core_get_volume(core); ocf_volume_t core_vol = ocf_core_get_volume(core);