Commit b3d12ada authored by Dariusz Stojaczyk's avatar Dariusz Stojaczyk Committed by Ben Walker
Browse files

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: default avatarDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/416656


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 69a762ca
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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;
}