From patchwork Fri Mar 25 07:20:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Qiu X-Patchwork-Id: 11712 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 7D25C4AAD; Fri, 25 Mar 2016 08:21:09 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id F23EA4AAD for ; Fri, 25 Mar 2016 08:21:07 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 25 Mar 2016 00:21:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,389,1455004800"; d="scan'208";a="941251928" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 25 Mar 2016 00:21:06 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u2P7L4Ev021671; Fri, 25 Mar 2016 15:21:04 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u2P7L1mv020739; Fri, 25 Mar 2016 15:21:03 +0800 Received: (from dayuqiu@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u2P7L1Fo020735; Fri, 25 Mar 2016 15:21:01 +0800 From: Michael Qiu To: dev@dpdk.org Cc: Michael Qiu Date: Fri, 25 Mar 2016 15:20:26 +0800 Message-Id: <1458890426-20688-3-git-send-email-michael.qiu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1458890426-20688-1-git-send-email-michael.qiu@intel.com> References: <1458890426-20688-1-git-send-email-michael.qiu@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 2/2] drivers/crypto: Fix anonymous union initialization in crypto X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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() };