Commit 3954ab6d authored by Jiapeng Chong's avatar Jiapeng Chong Committed by Herbert Xu

crypto: octeontx2 - Use swap() instead of swap_engines()

Fix the following coccicheck warning:

./drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c:1523:16-17:
WARNING opportunity for swap().
Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent eca568a3
...@@ -1514,16 +1514,6 @@ int otx2_cpt_discover_eng_capabilities(struct otx2_cptpf_dev *cptpf) ...@@ -1514,16 +1514,6 @@ int otx2_cpt_discover_eng_capabilities(struct otx2_cptpf_dev *cptpf)
return ret; return ret;
} }
static void swap_engines(struct otx2_cpt_engines *engsl,
struct otx2_cpt_engines *engsr)
{
struct otx2_cpt_engines engs;
engs = *engsl;
*engsl = *engsr;
*engsr = engs;
}
int otx2_cpt_dl_custom_egrp_create(struct otx2_cptpf_dev *cptpf, int otx2_cpt_dl_custom_egrp_create(struct otx2_cptpf_dev *cptpf,
struct devlink_param_gset_ctx *ctx) struct devlink_param_gset_ctx *ctx)
{ {
...@@ -1624,7 +1614,7 @@ int otx2_cpt_dl_custom_egrp_create(struct otx2_cptpf_dev *cptpf, ...@@ -1624,7 +1614,7 @@ int otx2_cpt_dl_custom_egrp_create(struct otx2_cptpf_dev *cptpf,
} }
/* Keep SE engines at zero index */ /* Keep SE engines at zero index */
if (engs[1].type == OTX2_CPT_SE_TYPES) if (engs[1].type == OTX2_CPT_SE_TYPES)
swap_engines(&engs[0], &engs[1]); swap(engs[0], engs[1]);
} }
mutex_lock(&eng_grps->lock); mutex_lock(&eng_grps->lock);
......
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