ioat/verify: do not use void* arithmetics

void* arithmetics are gcc extension. We'll be doing
more complex arithmetics on those pointers soon and
gcc will explode on us. Let's just keep it all
compliant to the C standard.

Change-Id: I9a236fc4d91ff72af1b7ac69b0ccf6b4631a6775
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/416656
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Dariusz Stojaczyk 2018-06-24 22:04:03 +02:00 committed by Ben Walker
parent 69a762ca52
commit b3d12ada2b

View File

@ -125,8 +125,8 @@ ioat_exit(void)
static void prepare_ioat_task(struct thread_entry *thread_entry, struct ioat_task *ioat_task)
{
int len;
int src_offset;
int dst_offset;
uintptr_t src_offset;
uintptr_t dst_offset;
int num_ddwords;
uint64_t fill_pattern;
@ -148,10 +148,10 @@ static void prepare_ioat_task(struct thread_entry *thread_entry, struct ioat_tas
dst_offset = rand_r(&seed) % (SRC_BUFFER_SIZE - len);
memset(ioat_task->buffer, 0, SRC_BUFFER_SIZE);
ioat_task->src = g_src + src_offset;
ioat_task->src = (void *)((uintptr_t)g_src + src_offset);
}
ioat_task->len = len;
ioat_task->dst = ioat_task->buffer + dst_offset;
ioat_task->dst = (void *)((uintptr_t)ioat_task->buffer + dst_offset);
ioat_task->thread_entry = thread_entry;
}