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) 2012-2021 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -256,7 +257,7 @@ void cas_blk_close_volume(ocf_volume_t 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;
int result = 0;

View File

@@ -24,7 +24,7 @@
#define CAS_DEBUG_PARAM(format, ...)
#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);
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;
}
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);
@@ -61,7 +61,7 @@ void block_dev_close_object(ocf_volume_t vol)
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 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;
}
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 block_device *bd = bdobj->btm_bd;
@@ -198,7 +198,7 @@ out:
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 bd_object *bdobj = bd_object(ocf_io_get_volume(io));

View File

@@ -1,19 +1,12 @@
/*
* Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __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);
#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
}
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_volume_t core_vol = ocf_core_get_volume(core);