Remove unused OCF_ERR_CACHE_IN_USE error code

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga 2019-05-22 11:09:02 +02:00
parent 8a82be339f
commit 46ae8b2ff1
4 changed files with 1 additions and 13 deletions

View File

@ -42,9 +42,6 @@ typedef enum {
/** Start cache failure */ /** Start cache failure */
OCF_ERR_START_CACHE_FAIL, OCF_ERR_START_CACHE_FAIL,
/** Cache is busy */
OCF_ERR_CACHE_IN_USE,
/** Cache ID does not exist */ /** Cache ID does not exist */
OCF_ERR_CACHE_NOT_EXIST, OCF_ERR_CACHE_NOT_EXIST,

View File

@ -163,7 +163,6 @@ void ocf_mngt_cache_read_lock(ocf_cache_t cache,
* @retval 0 Cache successfully locked * @retval 0 Cache successfully locked
* @retval -OCF_ERR_CACHE_NOT_EXIST Can not lock cache - cache is already * @retval -OCF_ERR_CACHE_NOT_EXIST Can not lock cache - cache is already
* stopping * stopping
* @retval -OCF_ERR_CACHE_IN_USE Can not lock cache - cache is in use
* @retval -OCF_ERR_NO_LOCK Lock not acquired * @retval -OCF_ERR_NO_LOCK Lock not acquired
*/ */
int ocf_mngt_cache_trylock(ocf_cache_t cache); int ocf_mngt_cache_trylock(ocf_cache_t cache);
@ -178,7 +177,6 @@ int ocf_mngt_cache_trylock(ocf_cache_t cache);
* @retval 0 Cache successfully locked * @retval 0 Cache successfully locked
* @retval -OCF_ERR_CACHE_NOT_EXIST Can not lock cache - cache is already * @retval -OCF_ERR_CACHE_NOT_EXIST Can not lock cache - cache is already
* stopping * stopping
* @retval -OCF_ERR_CACHE_IN_USE Can not lock cache - cache is in use
* @retval -OCF_ERR_NO_LOCK Lock not acquired * @retval -OCF_ERR_NO_LOCK Lock not acquired
*/ */
int ocf_mngt_cache_read_trylock(ocf_cache_t cache); int ocf_mngt_cache_read_trylock(ocf_cache_t cache);

View File

@ -270,14 +270,8 @@ static void _ocf_mngt_cache_unlock(ocf_cache_t cache,
int ocf_mngt_cache_lock_init(ocf_cache_t cache) int ocf_mngt_cache_lock_init(ocf_cache_t cache)
{ {
int result; return ocf_async_lock_init(&cache->lock,
result = ocf_async_lock_init(&cache->lock,
sizeof(struct ocf_mngt_cache_lock_context)); sizeof(struct ocf_mngt_cache_lock_context));
if (result)
return result;
return 0;
} }
void ocf_mngt_cache_lock_deinit(ocf_cache_t cache) void ocf_mngt_cache_lock_deinit(ocf_cache_t cache)

View File

@ -21,7 +21,6 @@ class OcfErrorCode(IntEnum):
OCF_ERR_TOO_MANY_CACHES = auto() OCF_ERR_TOO_MANY_CACHES = auto()
OCF_ERR_NO_FREE_RAM = auto() OCF_ERR_NO_FREE_RAM = auto()
OCF_ERR_START_CACHE_FAIL = auto() OCF_ERR_START_CACHE_FAIL = auto()
OCF_ERR_CACHE_IN_USE = auto()
OCF_ERR_CACHE_NOT_EXIST = auto() OCF_ERR_CACHE_NOT_EXIST = auto()
OCF_ERR_CACHE_EXIST = auto() OCF_ERR_CACHE_EXIST = auto()
OCF_ERR_TOO_MANY_CORES = auto() OCF_ERR_TOO_MANY_CORES = auto()