crypto: octeontx - Remove the unneeded result variable
authorye xingchen <ye.xingchen@zte.com.cn>
Thu, 1 Sep 2022 07:43:48 +0000 (07:43 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 9 Sep 2022 08:18:33 +0000 (16:18 +0800)
Return the value cptvf_send_msg_to_pf_timeout() directly instead of
storing it in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/marvell/octeontx/otx_cptvf_mbox.c

index 5663787c7a62a7f1e962975f5f19c226650e88c8..90fdafb7c4685bd1a6473f66acdf887161a4d53a 100644 (file)
@@ -159,12 +159,10 @@ static int cptvf_send_msg_to_pf_timeout(struct otx_cptvf *cptvf,
 int otx_cptvf_check_pf_ready(struct otx_cptvf *cptvf)
 {
        struct otx_cpt_mbox mbx = {};
-       int ret;
 
        mbx.msg = OTX_CPT_MSG_READY;
-       ret = cptvf_send_msg_to_pf_timeout(cptvf, &mbx);
 
-       return ret;
+       return cptvf_send_msg_to_pf_timeout(cptvf, &mbx);
 }
 
 /*
@@ -174,13 +172,11 @@ int otx_cptvf_check_pf_ready(struct otx_cptvf *cptvf)
 int otx_cptvf_send_vq_size_msg(struct otx_cptvf *cptvf)
 {
        struct otx_cpt_mbox mbx = {};
-       int ret;
 
        mbx.msg = OTX_CPT_MSG_QLEN;
        mbx.data = cptvf->qsize;
-       ret = cptvf_send_msg_to_pf_timeout(cptvf, &mbx);
 
-       return ret;
+       return cptvf_send_msg_to_pf_timeout(cptvf, &mbx);
 }
 
 /*
@@ -208,14 +204,12 @@ int otx_cptvf_send_vf_to_grp_msg(struct otx_cptvf *cptvf, int group)
 int otx_cptvf_send_vf_priority_msg(struct otx_cptvf *cptvf)
 {
        struct otx_cpt_mbox mbx = {};
-       int ret;
 
        mbx.msg = OTX_CPT_MSG_VQ_PRIORITY;
        /* Convey group of the VF */
        mbx.data = cptvf->priority;
-       ret = cptvf_send_msg_to_pf_timeout(cptvf, &mbx);
 
-       return ret;
+       return cptvf_send_msg_to_pf_timeout(cptvf, &mbx);
 }
 
 /*
@@ -224,12 +218,10 @@ int otx_cptvf_send_vf_priority_msg(struct otx_cptvf *cptvf)
 int otx_cptvf_send_vf_up(struct otx_cptvf *cptvf)
 {
        struct otx_cpt_mbox mbx = {};
-       int ret;
 
        mbx.msg = OTX_CPT_MSG_VF_UP;
-       ret = cptvf_send_msg_to_pf_timeout(cptvf, &mbx);
 
-       return ret;
+       return cptvf_send_msg_to_pf_timeout(cptvf, &mbx);
 }
 
 /*
@@ -238,10 +230,8 @@ int otx_cptvf_send_vf_up(struct otx_cptvf *cptvf)
 int otx_cptvf_send_vf_down(struct otx_cptvf *cptvf)
 {
        struct otx_cpt_mbox mbx = {};
-       int ret;
 
        mbx.msg = OTX_CPT_MSG_VF_DOWN;
-       ret = cptvf_send_msg_to_pf_timeout(cptvf, &mbx);
 
-       return ret;
+       return cptvf_send_msg_to_pf_timeout(cptvf, &mbx);
 }