diff mbox

[dpdk-dev,3/3] event/sw: fix build error for gcc 4.5.1

Message ID 20170406121428.16883-3-ferruh.yigit@intel.com (mailing list archive)
State Superseded, archived
Headers show

Checks

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

Commit Message

Ferruh Yigit April 6, 2017, 12:14 p.m. UTC
build error:
.../event/sw/sw_evdev_worker.c: In function ‘sw_event_release’:
.../event/sw/sw_evdev_worker.c:52:3: error: unknown field ‘op’ specified
in initializer

Fixed by updating struct initialization.

Fixes: 656af9180014 ("event/sw: add worker core functions")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/event/sw/sw_evdev_worker.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Van Haaren, Harry April 6, 2017, 12:21 p.m. UTC | #1
> From: Yigit, Ferruh

> Sent: Thursday, April 6, 2017 1:14 PM

> To: Jerin Jacob <jerin.jacob@caviumnetworks.com>; Richardson, Bruce

> <bruce.richardson@intel.com>; Van Haaren, Harry <harry.van.haaren@intel.com>; Thomas Monjalon

> <thomas.monjalon@6wind.com>

> Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>

> Subject: [PATCH 3/3] event/sw: fix build error for gcc 4.5.1

> 

> build error:

> .../event/sw/sw_evdev_worker.c: In function ‘sw_event_release’:

> .../event/sw/sw_evdev_worker.c:52:3: error: unknown field ‘op’ specified

> in initializer

> 

> Fixed by updating struct initialization.

> 

> Fixes: 656af9180014 ("event/sw: add worker core functions")

> 

> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>


Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
diff mbox

Patch

diff --git a/drivers/event/sw/sw_evdev_worker.c b/drivers/event/sw/sw_evdev_worker.c
index ed08778..b9b6f8d 100644
--- a/drivers/event/sw/sw_evdev_worker.c
+++ b/drivers/event/sw/sw_evdev_worker.c
@@ -48,9 +48,8 @@  sw_event_release(struct sw_port *p, uint8_t index)
 	RTE_SET_USED(index);
 
 	/* create drop message */
-	struct rte_event ev = {
-		.op = sw_qe_flag_map[RTE_EVENT_OP_RELEASE],
-	};
+	struct rte_event ev;
+	ev.op = sw_qe_flag_map[RTE_EVENT_OP_RELEASE];
 
 	uint16_t free_count;
 	qe_ring_enqueue_burst(p->rx_worker_ring, &ev, 1, &free_count);