Thread (37 messages) 37 messages, 3 authors, 2016-07-08

Re: [PATCH v3 6/6] ena: fix for icc compiler

From: Bruce Richardson <hidden>
Date: 2016-07-08 13:23:47

On Tue, Jul 05, 2016 at 09:52:09AM +0100, Ferruh Yigit wrote:
On 6/30/2016 4:04 PM, Jan Medala wrote:
quoted
Signed-off-by: Alexander Matushevsky <redacted>
Signed-off-by: Jakub Palider <redacted>
Signed-off-by: Jan Medala <redacted>
The compilation error to fix is [1], it may be good to add what to fix
into commit log.

[1]
== Build drivers/net/ena
  CC ena_ethdev.o
/tmp/dpdk_maintain/ena_v3/dpdk/drivers/net/ena/ena_ethdev.c(943): error
#188: enumerated type mixed with another type
        struct ena_com_create_io_ctx ctx = { 0 };
                                             ^

/tmp/dpdk_maintain/ena_v3/dpdk/drivers/net/ena/ena_ethdev.c(1036): error
#188: enumerated type mixed with another type
        struct ena_com_create_io_ctx ctx = { 0 };
                                             ^
...
quoted
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -940,7 +940,10 @@ static int ena_tx_queue_setup(struct rte_eth_dev *dev,
 			      __rte_unused unsigned int socket_id,
 			      __rte_unused const struct rte_eth_txconf *tx_conf)
 {
-	struct ena_com_create_io_ctx ctx = { 0 };
+	struct ena_com_create_io_ctx ctx =
+		/* policy set to _HOST just to satisfy icc compiler */
+		{ ENA_ADMIN_PLACEMENT_POLICY_HOST,
+		  ENA_COM_IO_QUEUE_DIRECTION_TX, 0, 0, 0, 0 };
Trailing "0" are not required, compiler will take care of them.
Actually, given that this is a structure init and not an array, the trailing 
zeros are actually required, since we are not using C99 designated initializers.
Therefore, I'll leave the zeros in - if anyone wants to convert the format of
the initializers to c99 style later, and remove the trailing zeros then, it can
go as a separate patch. I'll just merge this fix in with patch 1 that introduces
the issue.

/Bruce
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help