From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============0843631313688911108==" 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:14 +0800 Message-ID: <20200706064114.GA31236@9cf1f7d5106f> In-Reply-To: <202007061455.Nn14Bg8E%lkp@intel.com> List-Id: --===============0843631313688911108== 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/btif_plat.c:194:5-10: Unneeded variable: = "i_ret". Return "0" on line 198 drivers/misc/mediatek/btif/common/btif_plat.c:633:5-10: Unneeded variable: = "i_ret". Return "- 1" on line 646 drivers/misc/mediatek/btif/common/btif_plat.c:1141:5-10: Unneeded variable:= "i_ret". Return "- 1" on line 1155 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! btif_plat.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) --- a/drivers/misc/mediatek/btif/common/btif_plat.c +++ b/drivers/misc/mediatek/btif/common/btif_plat.c @@ -191,11 +191,9 @@ static int _get_btif_tx_fifo_room(P_MTK_ = static int _btif_tx_fifo_reset(P_MTK_BTIF_INFO_STR p_btif_info) { - int i_ret =3D 0; - if (p_btif_info->p_tx_fifo !=3D NULL) kfifo_reset(p_btif_info->p_tx_fifo); - return i_ret; + return 0; } = #endif @@ -630,7 +628,6 @@ int btif_sleep_ctrl(P_MTK_BTIF_INFO_STR = static int btif_tx_thr_set(P_MTK_BTIF_INFO_STR p_btif, unsigned int thr_co= unt) { - int i_ret =3D -1; unsigned long base =3D p_btif->base; unsigned int value =3D 0; = @@ -643,7 +640,7 @@ static int btif_tx_thr_set(P_MTK_BTIF_IN /*write back to BTIF_TRI_LVL*/ btif_reg_sync_writel(value, BTIF_TRI_LVL(base)); = - return i_ret; + return -1; } = /*************************************************************************= **** @@ -1137,8 +1134,6 @@ int hal_btif_raise_wak_sig(P_MTK_BTIF_IN **************************************************************************= ***/ int hal_btif_dump_reg(P_MTK_BTIF_INFO_STR p_btif, ENUM_BTIF_REG_ID flag) { -/*Chaozhong: To be implement*/ - int i_ret =3D -1; int idx =3D 0; /*unsigned long irq_flag =3D 0;*/ unsigned long base =3D p_btif->base; @@ -1152,7 +1147,7 @@ int hal_btif_dump_reg(P_MTK_BTIF_INFO_ST /*spin_unlock_irqrestore(&(g_clk_cg_spinlock), irq_flag);*/ BTIF_ERR_FUNC("%s: clock is off, this should never happen!!!\n", __FILE__); - return i_ret; + return -1; } #endif lsr =3D BTIF_READ32(BTIF_LSR(base)); @@ -1203,7 +1198,7 @@ int hal_btif_dump_reg(P_MTK_BTIF_INFO_ST BTIF_INFO_FUNC("Tx data is %s\n", (lsr & BTIF_LSR_TEMT_BIT) ? "empty" : "not empty"); = - return i_ret; + return -1; } = /*************************************************************************= **** --===============0843631313688911108==--