diff mbox

[dpdk-dev,1/2] event/octeontx: fix build with icc

Message ID 20170405153210.26513-1-ferruh.yigit@intel.com (mailing list archive)
State Accepted, archived
Headers show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ferruh Yigit April 5, 2017, 3:32 p.m. UTC
build error:
.../drivers/event/octeontx/ssovf_worker.c(212):
error #592: variable "get_work0" is used before its value is set
        RTE_SET_USED(get_work0);
        ^

.../drivers/event/octeontx/ssovf_worker.c(213):
error #592: variable "get_work1" is used before its value is set
        RTE_SET_USED(get_work1);
        ^
For x86 these variables set but not used, move macros below
where values assigned.

Fixes: f61808eaa9ad ("event/octeontx: add start function")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/event/octeontx/ssovf_worker.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/drivers/event/octeontx/ssovf_worker.c b/drivers/event/octeontx/ssovf_worker.c
index 6a99df0..ad3fe68 100644
--- a/drivers/event/octeontx/ssovf_worker.c
+++ b/drivers/event/octeontx/ssovf_worker.c
@@ -209,9 +209,6 @@  ssows_flush_events(struct ssows *ws, uint8_t queue_id)
 	uint64_t enable, get_work0, get_work1;
 	uint8_t *base = octeontx_ssovf_bar(OCTEONTX_SSO_GROUP, queue_id, 0);
 
-	RTE_SET_USED(get_work0);
-	RTE_SET_USED(get_work1);
-
 	enable = ssovf_read64(base + SSO_VHGRP_QCTL);
 	if (!enable)
 		return;
@@ -227,6 +224,9 @@  ssows_flush_events(struct ssows *ws, uint8_t queue_id)
 		cq_ds_cnt &= 0x1FFF1FFF0000;
 		ssovf_load_pair(get_work0, get_work1, ws->base + reg_off);
 	}
+
+	RTE_SET_USED(get_work0);
+	RTE_SET_USED(get_work1);
 }
 
 void