From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8945377515531178295==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [PATCH] mt6625l: fix returnvar.cocci warnings Date: Mon, 06 Jul 2020 14:41:15 +0800 Message-ID: <20200706064115.GA31323@9cf1f7d5106f> In-Reply-To: <202007061455.Nn14Bg8E%lkp@intel.com> List-Id: --===============8945377515531178295== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kernel test robot drivers/misc/mediatek/btif/common/mtk_btif.c:958:5-10: Unneeded variable: "= i_ret". Return "0" on line 967 drivers/misc/mediatek/btif/common/mtk_btif.c:2082:5-10: Unneeded variable: = "i_ret". Return "0" on line 2085 drivers/misc/mediatek/btif/common/mtk_btif.c:2430:5-10: Unneeded variable: = "i_ret". Return "0" on line 2444 Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci Fixes: 5a3d075a983c ("mt6625l: include wifi-folder") Signed-off-by: kernel test robot --- tree: https://github.com/frank-w/BPI-R2-4.14 5.8-wifi head: 4b8951570a4f2ef564d134f5aa8779fd067af1c9 commit: 5a3d075a983c166a2a4294c272b47698e24c97c6 [5/11] mt6625l: include wi= fi-folder Please take the patch only if it's a positive warning. Thanks! mtk_btif.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) --- a/drivers/misc/mediatek/btif/common/mtk_btif.c +++ b/drivers/misc/mediatek/btif/common/mtk_btif.c @@ -955,7 +955,6 @@ int _btif_irq_reg(P_MTK_BTIF_IRQ_STR p_i = int _btif_irq_free(P_MTK_BTIF_IRQ_STR p_irq, void *data) { - int i_ret =3D 0; unsigned int eint_num =3D p_irq->irq_id; = if ((p_irq->is_irq_sup) && (p_irq->reg_flag)) { @@ -964,7 +963,7 @@ int _btif_irq_free(P_MTK_BTIF_IRQ_STR p_ p_irq->reg_flag =3D false; } /*do nothing for this operation*/ - return i_ret; + return 0; } = int _btif_irq_ctrl(P_MTK_BTIF_IRQ_STR p_irq, bool en) @@ -2079,10 +2078,8 @@ static ENUM_BTIF_STATE _btif_state_get(p = static int _btif_state_release(p_mtk_btif p_btif) { - int i_ret =3D 0; - BTIF_MUTEX_UNLOCK(&(p_btif->state_mtx)); - return i_ret; + return 0; } = static int _btif_state_deinit(p_mtk_btif p_btif) @@ -2427,8 +2424,6 @@ btm_init_err: = static int _btif_tx_ctx_deinit(p_mtk_btif p_btif) { - int i_ret =3D 0; - if (p_btif->tx_ctx =3D=3D BTIF_TX_SINGLE_CTX) { if (p_btif->p_tx_wq) { destroy_workqueue(p_btif->p_tx_wq); @@ -2441,7 +2436,7 @@ static int _btif_tx_ctx_deinit(p_mtk_bti p_btif->p_tx_fifo =3D NULL; } } - return i_ret; + return 0; } = static int _btif_rx_btm_init(p_mtk_btif p_btif) --===============8945377515531178295==--