Remove unused functions

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
Robert Baldyga
2023-10-04 19:12:11 +02:00
committed by Michal Mielewczyk
parent 1ed707361f
commit 10098ccedd
3 changed files with 1 additions and 210 deletions

View File

@@ -1,5 +1,6 @@
/*
* Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -8,41 +9,6 @@
#include "../ocf_request.h"
/**
* Checks if 2 IOs are overlapping.
* @param start1 start of first range (inclusive)
* @param end1 end of first range (exclusive)
* @param start2 start of second range (inclusive)
* @param end2 end of second range (exclusive)
* @return 0 in case overlap is not detected, otherwise 1
*/
static inline int ocf_io_range_overlaps(uint32_t start1, uint32_t end1,
uint32_t start2, uint32_t end2)
{
if (start2 <= start1 && end2 >= start1)
return 1;
if (start2 >= start1 && end1 >= start2)
return 1;
return 0;
}
/**
* Checks if 2 IOs are overlapping.
* @param start1 start of first range (inclusive)
* @param count1 no of bytes, cachelines (etc) for first range
* @param start2 start of second range (inclusive)
* @param count2 no of bytes, cachelines (etc) for second range
* @return 0 in case overlap is not detected, otherwise 1
*/
static inline int ocf_io_overlaps(uint32_t start1, uint32_t count1,
uint32_t start2, uint32_t count2)
{
return ocf_io_range_overlaps(start1, start1 + count1 - 1, start2,
start2 + count2 - 1);
}
typedef void (*ocf_submit_end_t)(void *priv, int error);
void ocf_submit_volume_flush(ocf_volume_t volume,
@@ -57,15 +23,6 @@ void ocf_submit_write_zeros(ocf_volume_t volume, uint64_t addr,
void ocf_submit_cache_page(ocf_cache_t cache, uint64_t addr, int dir,
void *buffer, ocf_submit_end_t cmpl, void *priv);
void ocf_submit_volume_req(ocf_volume_t volume, struct ocf_request *req,
ocf_req_end_t callback);
void ocf_submit_cache_reqs(struct ocf_cache *cache,
struct ocf_request *req, int dir, uint64_t offset,
uint64_t size, unsigned int reqs, ocf_req_end_t callback);
void ocf_submit_cache_flush(struct ocf_request *req, ocf_req_end_t callback);
static inline struct ocf_io *ocf_new_cache_io(ocf_cache_t cache,
ocf_queue_t queue, uint64_t addr, uint32_t bytes,
uint32_t dir, uint32_t io_class, uint64_t flags)