Commit a43eb985 authored by Gary R Hook's avatar Gary R Hook Committed by Herbert Xu

crypto: ccp - Shorten the fields of the action structure

Use more concise field names; "perform_" is too verbose.
Signed-off-by: default avatarGary R Hook <gary.hook@amd.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent fba8855c
...@@ -528,12 +528,12 @@ static irqreturn_t ccp_irq_handler(int irq, void *data) ...@@ -528,12 +528,12 @@ static irqreturn_t ccp_irq_handler(int irq, void *data)
} }
static const struct ccp_actions ccp3_actions = { static const struct ccp_actions ccp3_actions = {
.perform_aes = ccp_perform_aes, .aes = ccp_perform_aes,
.perform_xts_aes = ccp_perform_xts_aes, .xts_aes = ccp_perform_xts_aes,
.perform_sha = ccp_perform_sha, .sha = ccp_perform_sha,
.perform_rsa = ccp_perform_rsa, .rsa = ccp_perform_rsa,
.perform_passthru = ccp_perform_passthru, .passthru = ccp_perform_passthru,
.perform_ecc = ccp_perform_ecc, .ecc = ccp_perform_ecc,
.init = ccp_init, .init = ccp_init,
.destroy = ccp_destroy, .destroy = ccp_destroy,
.irqhandler = ccp_irq_handler, .irqhandler = ccp_irq_handler,
......
...@@ -149,12 +149,12 @@ struct ccp_op; ...@@ -149,12 +149,12 @@ struct ccp_op;
/* Structure for computation functions that are device-specific */ /* Structure for computation functions that are device-specific */
struct ccp_actions { struct ccp_actions {
int (*perform_aes)(struct ccp_op *); int (*aes)(struct ccp_op *);
int (*perform_xts_aes)(struct ccp_op *); int (*xts_aes)(struct ccp_op *);
int (*perform_sha)(struct ccp_op *); int (*sha)(struct ccp_op *);
int (*perform_rsa)(struct ccp_op *); int (*rsa)(struct ccp_op *);
int (*perform_passthru)(struct ccp_op *); int (*passthru)(struct ccp_op *);
int (*perform_ecc)(struct ccp_op *); int (*ecc)(struct ccp_op *);
int (*init)(struct ccp_device *); int (*init)(struct ccp_device *);
void (*destroy)(struct ccp_device *); void (*destroy)(struct ccp_device *);
irqreturn_t (*irqhandler)(int, void *); irqreturn_t (*irqhandler)(int, void *);
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
* Copyright (C) 2013,2016 Advanced Micro Devices, Inc. * Copyright (C) 2013,2016 Advanced Micro Devices, Inc.
* *
* Author: Tom Lendacky <thomas.lendacky@amd.com> * Author: Tom Lendacky <thomas.lendacky@amd.com>
* Author: Gary R Hook <gary.hook@amd.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as * it under the terms of the GNU General Public License version 2 as
...@@ -478,7 +479,7 @@ static int ccp_copy_to_from_ksb(struct ccp_cmd_queue *cmd_q, ...@@ -478,7 +479,7 @@ static int ccp_copy_to_from_ksb(struct ccp_cmd_queue *cmd_q,
op.u.passthru.byte_swap = byte_swap; op.u.passthru.byte_swap = byte_swap;
return cmd_q->ccp->vdata->perform->perform_passthru(&op); return cmd_q->ccp->vdata->perform->passthru(&op);
} }
static int ccp_copy_to_ksb(struct ccp_cmd_queue *cmd_q, static int ccp_copy_to_ksb(struct ccp_cmd_queue *cmd_q,
...@@ -610,7 +611,7 @@ static int ccp_run_aes_cmac_cmd(struct ccp_cmd_queue *cmd_q, ...@@ -610,7 +611,7 @@ static int ccp_run_aes_cmac_cmd(struct ccp_cmd_queue *cmd_q,
} }
} }
ret = cmd_q->ccp->vdata->perform->perform_aes(&op); ret = cmd_q->ccp->vdata->perform->aes(&op);
if (ret) { if (ret) {
cmd->engine_error = cmd_q->cmd_error; cmd->engine_error = cmd_q->cmd_error;
goto e_src; goto e_src;
...@@ -772,7 +773,7 @@ static int ccp_run_aes_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) ...@@ -772,7 +773,7 @@ static int ccp_run_aes_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
op.soc = 1; op.soc = 1;
} }
ret = cmd_q->ccp->vdata->perform->perform_aes(&op); ret = cmd_q->ccp->vdata->perform->aes(&op);
if (ret) { if (ret) {
cmd->engine_error = cmd_q->cmd_error; cmd->engine_error = cmd_q->cmd_error;
goto e_dst; goto e_dst;
...@@ -937,7 +938,7 @@ static int ccp_run_xts_aes_cmd(struct ccp_cmd_queue *cmd_q, ...@@ -937,7 +938,7 @@ static int ccp_run_xts_aes_cmd(struct ccp_cmd_queue *cmd_q,
if (!src.sg_wa.bytes_left) if (!src.sg_wa.bytes_left)
op.eom = 1; op.eom = 1;
ret = cmd_q->ccp->vdata->perform->perform_xts_aes(&op); ret = cmd_q->ccp->vdata->perform->xts_aes(&op);
if (ret) { if (ret) {
cmd->engine_error = cmd_q->cmd_error; cmd->engine_error = cmd_q->cmd_error;
goto e_dst; goto e_dst;
...@@ -1094,7 +1095,7 @@ static int ccp_run_sha_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) ...@@ -1094,7 +1095,7 @@ static int ccp_run_sha_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
if (sha->final && !src.sg_wa.bytes_left) if (sha->final && !src.sg_wa.bytes_left)
op.eom = 1; op.eom = 1;
ret = cmd_q->ccp->vdata->perform->perform_sha(&op); ret = cmd_q->ccp->vdata->perform->sha(&op);
if (ret) { if (ret) {
cmd->engine_error = cmd_q->cmd_error; cmd->engine_error = cmd_q->cmd_error;
goto e_data; goto e_data;
...@@ -1274,7 +1275,7 @@ static int ccp_run_rsa_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) ...@@ -1274,7 +1275,7 @@ static int ccp_run_rsa_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
op.u.rsa.mod_size = rsa->key_size; op.u.rsa.mod_size = rsa->key_size;
op.u.rsa.input_len = i_len; op.u.rsa.input_len = i_len;
ret = cmd_q->ccp->vdata->perform->perform_rsa(&op); ret = cmd_q->ccp->vdata->perform->rsa(&op);
if (ret) { if (ret) {
cmd->engine_error = cmd_q->cmd_error; cmd->engine_error = cmd_q->cmd_error;
goto e_dst; goto e_dst;
...@@ -1399,7 +1400,7 @@ static int ccp_run_passthru_cmd(struct ccp_cmd_queue *cmd_q, ...@@ -1399,7 +1400,7 @@ static int ccp_run_passthru_cmd(struct ccp_cmd_queue *cmd_q,
op.dst.u.dma.offset = dst.sg_wa.sg_used; op.dst.u.dma.offset = dst.sg_wa.sg_used;
op.dst.u.dma.length = op.src.u.dma.length; op.dst.u.dma.length = op.src.u.dma.length;
ret = cmd_q->ccp->vdata->perform->perform_passthru(&op); ret = cmd_q->ccp->vdata->perform->passthru(&op);
if (ret) { if (ret) {
cmd->engine_error = cmd_q->cmd_error; cmd->engine_error = cmd_q->cmd_error;
goto e_dst; goto e_dst;
...@@ -1484,7 +1485,7 @@ static int ccp_run_passthru_nomap_cmd(struct ccp_cmd_queue *cmd_q, ...@@ -1484,7 +1485,7 @@ static int ccp_run_passthru_nomap_cmd(struct ccp_cmd_queue *cmd_q,
op.dst.u.dma.offset = 0; op.dst.u.dma.offset = 0;
op.dst.u.dma.length = pt->src_len; op.dst.u.dma.length = pt->src_len;
ret = cmd_q->ccp->vdata->perform->perform_passthru(&op); ret = cmd_q->ccp->vdata->perform->passthru(&op);
if (ret) if (ret)
cmd->engine_error = cmd_q->cmd_error; cmd->engine_error = cmd_q->cmd_error;
...@@ -1575,7 +1576,7 @@ static int ccp_run_ecc_mm_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) ...@@ -1575,7 +1576,7 @@ static int ccp_run_ecc_mm_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
op.u.ecc.function = cmd->u.ecc.function; op.u.ecc.function = cmd->u.ecc.function;
ret = cmd_q->ccp->vdata->perform->perform_ecc(&op); ret = cmd_q->ccp->vdata->perform->ecc(&op);
if (ret) { if (ret) {
cmd->engine_error = cmd_q->cmd_error; cmd->engine_error = cmd_q->cmd_error;
goto e_dst; goto e_dst;
...@@ -1739,7 +1740,7 @@ static int ccp_run_ecc_pm_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) ...@@ -1739,7 +1740,7 @@ static int ccp_run_ecc_pm_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
op.u.ecc.function = cmd->u.ecc.function; op.u.ecc.function = cmd->u.ecc.function;
ret = cmd_q->ccp->vdata->perform->perform_ecc(&op); ret = cmd_q->ccp->vdata->perform->ecc(&op);
if (ret) { if (ret) {
cmd->engine_error = cmd_q->cmd_error; cmd->engine_error = cmd_q->cmd_error;
goto e_dst; goto e_dst;
......
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