aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-12-05 11:42:44 +0100
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-12-05 11:49:52 +0100
commitc300e3551a11a249b600463891a19a6792f42901 (patch)
tree0ec046063bf0cd783e9a7ccbb4f54baadccf1213 /drivers/crypto
parent893ab58d98e090c1631f4e2dd43069eeb58e78dc (diff)
Imported Upstream version 16.07.2
Change-Id: I76bc313e0942233ce259612069ded302dd6c87bb Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/kasumi/rte_kasumi_pmd.c8
-rw-r--r--drivers/crypto/null/null_crypto_pmd_ops.c2
-rw-r--r--drivers/crypto/qat/qat_adf/icp_qat_fw.h2
-rw-r--r--drivers/crypto/snow3g/rte_snow3g_pmd.c8
4 files changed, 10 insertions, 10 deletions
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 4e217434..df1eb529 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -108,7 +108,7 @@ kasumi_set_session_parameters(struct kasumi_session *sess,
{
const struct rte_crypto_sym_xform *auth_xform = NULL;
const struct rte_crypto_sym_xform *cipher_xform = NULL;
- int mode;
+ enum kasumi_operation mode;
/* Select Crypto operation - hash then cipher / cipher then hash */
mode = kasumi_get_mode(xform);
@@ -125,9 +125,9 @@ kasumi_set_session_parameters(struct kasumi_session *sess,
/* Fall-through */
case KASUMI_OP_ONLY_AUTH:
auth_xform = xform;
- }
-
- if (mode == KASUMI_OP_NOT_SUPPORTED) {
+ break;
+ case KASUMI_OP_NOT_SUPPORTED:
+ default:
KASUMI_LOG_ERR("Unsupported operation chain order parameter");
return -EINVAL;
}
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index cf1a5196..26ff6319 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -70,7 +70,7 @@ static const struct rte_cryptodev_capabilities null_crypto_pmd_capabilities[] =
.key_size = {
.min = 0,
.max = 0,
- .increment = 8
+ .increment = 0
},
.iv_size = {
.min = 0,
diff --git a/drivers/crypto/qat/qat_adf/icp_qat_fw.h b/drivers/crypto/qat/qat_adf/icp_qat_fw.h
index 498ee833..5de34d55 100644
--- a/drivers/crypto/qat/qat_adf/icp_qat_fw.h
+++ b/drivers/crypto/qat/qat_adf/icp_qat_fw.h
@@ -46,7 +46,7 @@
*/
#ifndef _ICP_QAT_FW_H_
#define _ICP_QAT_FW_H_
-#include <linux/types.h>
+#include <sys/types.h>
#include "icp_qat_hw.h"
#define QAT_FIELD_SET(flags, val, bitpos, mask) \
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 87cd070a..ec31de28 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -107,7 +107,7 @@ snow3g_set_session_parameters(struct snow3g_session *sess,
{
const struct rte_crypto_sym_xform *auth_xform = NULL;
const struct rte_crypto_sym_xform *cipher_xform = NULL;
- int mode;
+ enum snow3g_operation mode;
/* Select Crypto operation - hash then cipher / cipher then hash */
mode = snow3g_get_mode(xform);
@@ -125,9 +125,9 @@ snow3g_set_session_parameters(struct snow3g_session *sess,
/* Fall-through */
case SNOW3G_OP_ONLY_AUTH:
auth_xform = xform;
- }
-
- if (mode == SNOW3G_OP_NOT_SUPPORTED) {
+ break;
+ case SNOW3G_OP_NOT_SUPPORTED:
+ default:
SNOW3G_LOG_ERR("Unsupported operation chain order parameter");
return -EINVAL;
}