DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Trahe, Fiona" <fiona.trahe@intel.com>
To: "Qiu, Michael" <michael.qiu@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Qiu, Michael" <michael.qiu@intel.com>,
	"Trahe, Fiona" <fiona.trahe@intel.com>
Subject: Re: [dpdk-dev] [PATCH 2/2] drivers/crypto: Fix anonymous union	initialization in crypto
Date: Fri, 25 Mar 2016 10:48:22 +0000	[thread overview]
Message-ID: <348A99DA5F5B7549AA880327E580B43588FA71E1@IRSMSX101.ger.corp.intel.com> (raw)
In-Reply-To: <1458890426-20688-3-git-send-email-michael.qiu@intel.com>



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Michael Qiu
> Sent: Friday, March 25, 2016 7:20 AM
> To: dev@dpdk.org
> Cc: Qiu, Michael
> Subject: [dpdk-dev] [PATCH 2/2] drivers/crypto: Fix anonymous union
> initialization in crypto
> 
> In SUSE11-SP3 i686 platform, with gcc 4.5.1, there is a compile issue:
> 	null_crypto_pmd_ops.c:44:3: error:
> 		unknown field ‘sym’ specified in initializer
> 	cc1: warnings being treated as errors
> 
> The member in anonymous union initialization should be inside '{}', otherwise it
> will report an error.
> 
> Fixes: 26c2e4ad5ad4 ("cryptodev: add capabilities discovery")
> 
> Signed-off-by: Michael Qiu <michael.qiu@intel.com>


Initialisation in QAT PMD has same issue, possibly also other PMDs.
I'll extend this fix where needed.

> ---
>  drivers/crypto/null/null_crypto_pmd_ops.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c
> b/drivers/crypto/null/null_crypto_pmd_ops.c
> index 39f8088..b7470c0 100644
> --- a/drivers/crypto/null/null_crypto_pmd_ops.c
> +++ b/drivers/crypto/null/null_crypto_pmd_ops.c
> @@ -41,9 +41,9 @@
>  static const struct rte_cryptodev_capabilities null_crypto_pmd_capabilities[] = {
>  	{	/* NULL (AUTH) */
>  		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
> -		.sym = {
> +		{.sym = {
>  			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
> -			.auth = {
> +			{.auth = {
>  				.algo = RTE_CRYPTO_AUTH_NULL,
>  				.block_size = 1,
>  				.key_size = {
> @@ -57,14 +57,14 @@ static const struct rte_cryptodev_capabilities
> null_crypto_pmd_capabilities[] =
>  					.increment = 0
>  				},
>  				.aad_size = { 0 }
> -			}
> -		}
> +			}, },
> +		}, },
>  	},
>  	{	/* NULL (CIPHER) */
>  		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
> -		.sym = {
> +		{.sym = {
>  			.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
> -			.cipher = {
> +			{.cipher = {
>  				.algo = RTE_CRYPTO_CIPHER_NULL,
>  				.block_size = 1,
>  				.key_size = {
> @@ -77,8 +77,8 @@ static const struct rte_cryptodev_capabilities
> null_crypto_pmd_capabilities[] =
>  					.max = 0,
>  					.increment = 0
>  				}
> -			}
> -		}
> +			}, },
> +		}, },
>  	},
>  	RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
>  };
> --
> 1.9.3


  reply	other threads:[~2016-03-25 10:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-25  7:20 [dpdk-dev] [PATCH 0/2] Compile fixes in SUSE11 SP3 i686 platform Michael Qiu
2016-03-25  7:20 ` [dpdk-dev] [PATCH 1/2] lib/librte_lpm: Fix anonymous union initialization issue Michael Qiu
2016-03-25 17:02   ` Stephen Hemminger
2016-03-30  3:38   ` [dpdk-dev] [PATCH 1/2 v2] " Michael Qiu
2016-03-25  7:20 ` [dpdk-dev] [PATCH 2/2] drivers/crypto: Fix anonymous union initialization in crypto Michael Qiu
2016-03-25 10:48   ` Trahe, Fiona [this message]
2016-03-30 12:49   ` [dpdk-dev] [PATCH v2] drivers/crypto: Fix anonymous union initialization in crypto PMDs Fiona Trahe
2016-03-31 19:32 ` [dpdk-dev] [PATCH 0/2] Compile fixes in SUSE11 SP3 i686 platform Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=348A99DA5F5B7549AA880327E580B43588FA71E1@IRSMSX101.ger.corp.intel.com \
    --to=fiona.trahe@intel.com \
    --cc=dev@dpdk.org \
    --cc=michael.qiu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).