diff options
author | Jiapeng Chong <jiapeng.chong@linux.alibaba.com> | 2021-12-16 10:48:14 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2021-12-24 06:18:22 +0300 |
commit | 3954ab6d9fce7df915a35a6ad4d657753340b011 (patch) | |
tree | e66daf5ea4701300cd2c664014e0a7439e00c46c /drivers/crypto/marvell | |
parent | eca568a39481728224edd5c2053ead5479dd8e07 (diff) | |
download | linux-3954ab6d9fce7df915a35a6ad4d657753340b011.tar.xz |
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: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/marvell')
-rw-r--r-- | drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c b/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c index 57307eac541c..9aef37972246 100644 --- a/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c +++ b/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c @@ -1514,16 +1514,6 @@ delete_grps: 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, struct devlink_param_gset_ctx *ctx) { @@ -1624,7 +1614,7 @@ int otx2_cpt_dl_custom_egrp_create(struct otx2_cptpf_dev *cptpf, } /* Keep SE engines at zero index */ if (engs[1].type == OTX2_CPT_SE_TYPES) - swap_engines(&engs[0], &engs[1]); + swap(engs[0], engs[1]); } mutex_lock(&eng_grps->lock); |