Commit 85420e0b authored by Tyler Olivieri's avatar Tyler Olivieri Committed by Greg Kroah-Hartman

staging: ccree: fix placement of curly braces

Patch to fix checkpatch errors:
ERROR: that open brace { should be on the previous line
ERROR: open brace '{' following function declarations go on the next line
Signed-off-by: default avatarTyler Olivieri <sleepingzucchini@gmail.com>
Acked-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 113f0d6a
...@@ -696,8 +696,7 @@ void ssi_buffer_mgr_unmap_aead_request( ...@@ -696,8 +696,7 @@ void ssi_buffer_mgr_unmap_aead_request(
} }
if (drvdata->coherent && if (drvdata->coherent &&
(areq_ctx->gen_ctx.op_type == DRV_CRYPTO_DIRECTION_DECRYPT) && (areq_ctx->gen_ctx.op_type == DRV_CRYPTO_DIRECTION_DECRYPT) &&
likely(req->src == req->dst)) likely(req->src == req->dst)) {
{
u32 size_to_skip = req->assoclen; u32 size_to_skip = req->assoclen;
if (areq_ctx->is_gcm4543) if (areq_ctx->is_gcm4543)
...@@ -1134,8 +1133,7 @@ static inline int ssi_buffer_mgr_aead_chain_data( ...@@ -1134,8 +1133,7 @@ static inline int ssi_buffer_mgr_aead_chain_data(
sg_index += areq_ctx->srcSgl->length; sg_index += areq_ctx->srcSgl->length;
src_mapped_nents--; src_mapped_nents--;
} }
if (unlikely(src_mapped_nents > LLI_MAX_NUM_OF_DATA_ENTRIES)) if (unlikely(src_mapped_nents > LLI_MAX_NUM_OF_DATA_ENTRIES)) {
{
SSI_LOG_ERR("Too many fragments. current %d max %d\n", SSI_LOG_ERR("Too many fragments. current %d max %d\n",
src_mapped_nents, LLI_MAX_NUM_OF_DATA_ENTRIES); src_mapped_nents, LLI_MAX_NUM_OF_DATA_ENTRIES);
return -ENOMEM; return -ENOMEM;
...@@ -1177,8 +1175,7 @@ static inline int ssi_buffer_mgr_aead_chain_data( ...@@ -1177,8 +1175,7 @@ static inline int ssi_buffer_mgr_aead_chain_data(
sg_index += areq_ctx->dstSgl->length; sg_index += areq_ctx->dstSgl->length;
dst_mapped_nents--; dst_mapped_nents--;
} }
if (unlikely(dst_mapped_nents > LLI_MAX_NUM_OF_DATA_ENTRIES)) if (unlikely(dst_mapped_nents > LLI_MAX_NUM_OF_DATA_ENTRIES)) {
{
SSI_LOG_ERR("Too many fragments. current %d max %d\n", SSI_LOG_ERR("Too many fragments. current %d max %d\n",
dst_mapped_nents, LLI_MAX_NUM_OF_DATA_ENTRIES); dst_mapped_nents, LLI_MAX_NUM_OF_DATA_ENTRIES);
return -ENOMEM; return -ENOMEM;
...@@ -1274,8 +1271,7 @@ int ssi_buffer_mgr_map_aead_request( ...@@ -1274,8 +1271,7 @@ int ssi_buffer_mgr_map_aead_request(
if (drvdata->coherent && if (drvdata->coherent &&
(areq_ctx->gen_ctx.op_type == DRV_CRYPTO_DIRECTION_DECRYPT) && (areq_ctx->gen_ctx.op_type == DRV_CRYPTO_DIRECTION_DECRYPT) &&
likely(req->src == req->dst)) likely(req->src == req->dst)) {
{
u32 size_to_skip = req->assoclen; u32 size_to_skip = req->assoclen;
if (is_gcm4543) if (is_gcm4543)
......
...@@ -68,7 +68,8 @@ struct ssi_ablkcipher_ctx { ...@@ -68,7 +68,8 @@ struct ssi_ablkcipher_ctx {
static void ssi_ablkcipher_complete(struct device *dev, void *ssi_req, void __iomem *cc_base); static void ssi_ablkcipher_complete(struct device *dev, void *ssi_req, void __iomem *cc_base);
static int validate_keys_sizes(struct ssi_ablkcipher_ctx *ctx_p, u32 size) { static int validate_keys_sizes(struct ssi_ablkcipher_ctx *ctx_p, u32 size)
{
switch (ctx_p->flow_mode) { switch (ctx_p->flow_mode) {
case S_DIN_to_AES: case S_DIN_to_AES:
switch (size) { switch (size) {
...@@ -108,7 +109,8 @@ static int validate_keys_sizes(struct ssi_ablkcipher_ctx *ctx_p, u32 size) { ...@@ -108,7 +109,8 @@ static int validate_keys_sizes(struct ssi_ablkcipher_ctx *ctx_p, u32 size) {
return -EINVAL; return -EINVAL;
} }
static int validate_data_size(struct ssi_ablkcipher_ctx *ctx_p, unsigned int size) { static int validate_data_size(struct ssi_ablkcipher_ctx *ctx_p, unsigned int size)
{
switch (ctx_p->flow_mode) { switch (ctx_p->flow_mode) {
case S_DIN_to_AES: case S_DIN_to_AES:
switch (ctx_p->cipher_mode) { switch (ctx_p->cipher_mode) {
......
...@@ -301,13 +301,10 @@ static int init_cc_resources(struct platform_device *plat_dev) ...@@ -301,13 +301,10 @@ static int init_cc_resources(struct platform_device *plat_dev)
goto init_cc_res_err; goto init_cc_res_err;
if (!new_drvdata->plat_dev->dev.dma_mask) if (!new_drvdata->plat_dev->dev.dma_mask)
{
new_drvdata->plat_dev->dev.dma_mask = &new_drvdata->plat_dev->dev.coherent_dma_mask; new_drvdata->plat_dev->dev.dma_mask = &new_drvdata->plat_dev->dev.coherent_dma_mask;
}
if (!new_drvdata->plat_dev->dev.coherent_dma_mask) if (!new_drvdata->plat_dev->dev.coherent_dma_mask)
{
new_drvdata->plat_dev->dev.coherent_dma_mask = DMA_BIT_MASK(DMA_BIT_MASK_LEN); new_drvdata->plat_dev->dev.coherent_dma_mask = DMA_BIT_MASK(DMA_BIT_MASK_LEN);
}
/* Verify correct mapping */ /* Verify correct mapping */
signature_val = CC_HAL_READ_REGISTER(CC_REG_OFFSET(HOST_RGF, HOST_SIGNATURE)); signature_val = CC_HAL_READ_REGISTER(CC_REG_OFFSET(HOST_RGF, HOST_SIGNATURE));
......
This diff is collapsed.
...@@ -2366,7 +2366,8 @@ int ssi_hash_free(struct ssi_drvdata *drvdata) ...@@ -2366,7 +2366,8 @@ int ssi_hash_free(struct ssi_drvdata *drvdata)
static void ssi_hash_create_xcbc_setup(struct ahash_request *areq, static void ssi_hash_create_xcbc_setup(struct ahash_request *areq,
struct cc_hw_desc desc[], struct cc_hw_desc desc[],
unsigned int *seq_size) { unsigned int *seq_size)
{
unsigned int idx = *seq_size; unsigned int idx = *seq_size;
struct ahash_req_ctx *state = ahash_request_ctx(areq); struct ahash_req_ctx *state = ahash_request_ctx(areq);
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
......
...@@ -40,8 +40,7 @@ struct stat_name { ...@@ -40,8 +40,7 @@ struct stat_name {
const char *stat_phase_name[MAX_STAT_PHASES]; const char *stat_phase_name[MAX_STAT_PHASES];
}; };
static struct stat_name stat_name_db[MAX_STAT_OP_TYPES] = static struct stat_name stat_name_db[MAX_STAT_OP_TYPES] = {
{
{ {
/* STAT_OP_TYPE_NULL */ /* STAT_OP_TYPE_NULL */
.op_type_name = "NULL", .op_type_name = "NULL",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment