OCF provides own macros for MIN, MAX, and DIV_ROUND_UP

Signed-off-by: Mariusz Barczak <mariusz.barczak@intel.com>
This commit is contained in:
Mariusz Barczak
2018-12-13 05:14:39 -05:00
parent abb8dc5067
commit 15ed5b4450
17 changed files with 28 additions and 35 deletions

View File

@@ -92,7 +92,7 @@ int ocf_submit_obj_discard_wait(ocf_data_obj_t obj, uint64_t addr,
break;
}
bytes = min(length, max_length);
bytes = OCF_MIN(length, max_length);
env_atomic_inc(&cntx.req_remaining);
@@ -139,7 +139,7 @@ int ocf_submit_write_zeroes_wait(ocf_data_obj_t obj, uint64_t addr,
while (length) {
env_completion_init(&cntx.complete);
bytes = MIN(length, max_length);
bytes = OCF_MIN(length, max_length);
ocf_io_configure(io, addr, bytes, OCF_WRITE, 0, 0);
ocf_io_set_cmpl(io, &cntx, NULL,