* [PATCH] mt6625l: fix boolconv.cocci warnings
2020-07-06 6:41 [frank-w-bpi-r2-4.14:5.8-wifi 5/11] drivers/misc/mediatek/connectivity/common/common_detect/sdio_detect.c:88:34-35: WARNING: Use ARRAY_SIZE kernel test robot
@ 2020-07-06 6:41 ` kernel test robot
2020-07-06 6:41 ` [PATCH] mt6625l: fix eno.cocci warnings kernel test robot
` (7 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2020-07-06 6:41 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1602 bytes --]
From: kernel test robot <lkp@intel.com>
drivers/misc/mediatek/btif/common/mtk_btif_exp.c:592:64-69: WARNING: conversion to bool not needed here
drivers/misc/mediatek/btif/common/mtk_btif_exp.c:406:64-69: WARNING: conversion to bool not needed here
Remove unneeded conversion to bool
Semantic patch information:
Relational and logical operators evaluate to bool,
explicit conversion is overly verbose and unneeded.
Generated by: scripts/coccinelle/misc/boolconv.cocci
Fixes: 5a3d075a983c ("mt6625l: include wifi-folder")
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://github.com/frank-w/BPI-R2-4.14 5.8-wifi
head: 4b8951570a4f2ef564d134f5aa8779fd067af1c9
commit: 5a3d075a983c166a2a4294c272b47698e24c97c6 [5/11] mt6625l: include wifi-folder
Please take the patch only if it's a positive warning. Thanks!
mtk_btif_exp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/misc/mediatek/btif/common/mtk_btif_exp.c
+++ b/drivers/misc/mediatek/btif/common/mtk_btif_exp.c
@@ -403,7 +403,7 @@ int mtk_wcn_btif_loopback_ctrl(unsigned
if (p_btif == NULL)
return E_BTIF_INVAL_PARAM;
i_ret =
- btif_lpbk_ctrl(p_btif, enable == BTIF_LPBK_ENABLE ? true : false);
+ btif_lpbk_ctrl(p_btif, enable == BTIF_LPBK_ENABLE);
return i_ret;
}
@@ -589,7 +589,7 @@ int btif_loopback_ctrl_no_id(ENUM_BTIF_L
p_mtk_btif p_btif = &g_btif[0];
i_ret =
- btif_lpbk_ctrl(p_btif, enable == BTIF_LPBK_ENABLE ? true : false);
+ btif_lpbk_ctrl(p_btif, enable == BTIF_LPBK_ENABLE);
return i_ret;
}
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH] mt6625l: fix eno.cocci warnings
2020-07-06 6:41 [frank-w-bpi-r2-4.14:5.8-wifi 5/11] drivers/misc/mediatek/connectivity/common/common_detect/sdio_detect.c:88:34-35: WARNING: Use ARRAY_SIZE kernel test robot
2020-07-06 6:41 ` [PATCH] mt6625l: fix boolconv.cocci warnings kernel test robot
@ 2020-07-06 6:41 ` kernel test robot
2020-07-06 6:41 ` [PATCH] mt6625l: fix platform_no_drv_owner.cocci warnings kernel test robot
` (6 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2020-07-06 6:41 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1127 bytes --]
From: kernel test robot <lkp@intel.com>
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/stp_dbg.c:2001:5-11: ERROR: allocation function on line 1998 returns NULL not ERR_PTR on failure
The various basic memory allocation functions don't return ERR_PTR
Generated by: scripts/coccinelle/null/eno.cocci
Fixes: 5a3d075a983c ("mt6625l: include wifi-folder")
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://github.com/frank-w/BPI-R2-4.14 5.8-wifi
head: 4b8951570a4f2ef564d134f5aa8779fd067af1c9
commit: 5a3d075a983c166a2a4294c272b47698e24c97c6 [5/11] mt6625l: include wifi-folder
stp_dbg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/stp_dbg.c
+++ b/drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/stp_dbg.c
@@ -1998,7 +1998,7 @@ MTKSTP_DBG_T *stp_dbg_init(void *btm_hal
stp_dbg = kzalloc(sizeof(MTKSTP_DBG_T), GFP_KERNEL);
if (stp_dbg == NULL)
goto ERR_EXIT1;
- if (IS_ERR(stp_dbg)) {
+ if (!stp_dbg) {
STP_DBG_ERR_FUNC("-ENOMEM\n");
goto ERR_EXIT1;
}
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH] mt6625l: fix platform_no_drv_owner.cocci warnings
2020-07-06 6:41 [frank-w-bpi-r2-4.14:5.8-wifi 5/11] drivers/misc/mediatek/connectivity/common/common_detect/sdio_detect.c:88:34-35: WARNING: Use ARRAY_SIZE kernel test robot
2020-07-06 6:41 ` [PATCH] mt6625l: fix boolconv.cocci warnings kernel test robot
2020-07-06 6:41 ` [PATCH] mt6625l: fix eno.cocci warnings kernel test robot
@ 2020-07-06 6:41 ` kernel test robot
2020-07-06 6:41 ` [PATCH] mt6625l: fix returnvar.cocci warnings kernel test robot
` (5 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2020-07-06 6:41 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]
From: kernel test robot <lkp@intel.com>
drivers/misc/mediatek/connectivity/common/common_detect/wmt_detect.c:269:3-8: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Fixes: 5a3d075a983c ("mt6625l: include wifi-folder")
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://github.com/frank-w/BPI-R2-4.14 5.8-wifi
head: 4b8951570a4f2ef564d134f5aa8779fd067af1c9
commit: 5a3d075a983c166a2a4294c272b47698e24c97c6 [5/11] mt6625l: include wifi-folder
wmt_detect.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/misc/mediatek/connectivity/common/common_detect/wmt_detect.c
+++ b/drivers/misc/mediatek/connectivity/common/common_detect/wmt_detect.c
@@ -266,7 +266,6 @@ static struct platform_driver wmt_detect
.probe = wmt_detect_probe,
.remove = wmt_detect_remove,
.driver = {
- .owner = THIS_MODULE,
.name = "mediatek,connectivity-combo",
.of_match_table = wmt_detect_match,
},
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH] mt6625l: fix returnvar.cocci warnings
2020-07-06 6:41 [frank-w-bpi-r2-4.14:5.8-wifi 5/11] drivers/misc/mediatek/connectivity/common/common_detect/sdio_detect.c:88:34-35: WARNING: Use ARRAY_SIZE kernel test robot
` (2 preceding siblings ...)
2020-07-06 6:41 ` [PATCH] mt6625l: fix platform_no_drv_owner.cocci warnings kernel test robot
@ 2020-07-06 6:41 ` kernel test robot
2020-07-06 6:41 ` kernel test robot
` (4 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2020-07-06 6:41 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1355 bytes --]
From: kernel test robot <lkp@intel.com>
drivers/misc/mediatek/connectivity/common/common_detect/drv_init/bluetooth_drv_init.c:25:5-10: Unneeded variable: "i_ret". Return "- 1" on line 35
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 <lkp@intel.com>
---
tree: https://github.com/frank-w/BPI-R2-4.14 5.8-wifi
head: 4b8951570a4f2ef564d134f5aa8779fd067af1c9
commit: 5a3d075a983c166a2a4294c272b47698e24c97c6 [5/11] mt6625l: include wifi-folder
Please take the patch only if it's a positive warning. Thanks!
bluetooth_drv_init.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/misc/mediatek/connectivity/common/common_detect/drv_init/bluetooth_drv_init.c
+++ b/drivers/misc/mediatek/connectivity/common/common_detect/drv_init/bluetooth_drv_init.c
@@ -22,7 +22,6 @@
int do_bluetooth_drv_init(int chip_id)
{
- int i_ret = -1;
#if 0
#if defined(CONFIG_MTK_COMBO_BT) || defined(CONFIG_MTK_COMBO_BT_HCI)
WMT_DETECT_INFO_FUNC("start to do bluetooth driver init\n");
@@ -32,5 +31,5 @@ int do_bluetooth_drv_init(int chip_id)
WMT_DETECT_INFO_FUNC("CONFIG_MTK_COMBO_BT is not defined\n");
#endif
#endif
- return i_ret;
+ return -1;
}
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH] mt6625l: fix returnvar.cocci warnings
2020-07-06 6:41 [frank-w-bpi-r2-4.14:5.8-wifi 5/11] drivers/misc/mediatek/connectivity/common/common_detect/sdio_detect.c:88:34-35: WARNING: Use ARRAY_SIZE kernel test robot
` (3 preceding siblings ...)
2020-07-06 6:41 ` [PATCH] mt6625l: fix returnvar.cocci warnings kernel test robot
@ 2020-07-06 6:41 ` kernel test robot
2020-07-06 6:41 ` kernel test robot
` (3 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2020-07-06 6:41 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2456 bytes --]
From: kernel test robot <lkp@intel.com>
drivers/misc/mediatek/btif/common/btif_dma_plat.c:393:5-10: Unneeded variable: "i_ret". Return "0" on line 468
drivers/misc/mediatek/btif/common/btif_dma_plat.c:587:14-19: Unneeded variable: "i_ret". Return "- 1" on line 599
drivers/misc/mediatek/btif/common/btif_dma_plat.c:1375:14-19: Unneeded variable: "i_ret". Return "- 1" on line 1377
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 <lkp@intel.com>
---
tree: https://github.com/frank-w/BPI-R2-4.14 5.8-wifi
head: 4b8951570a4f2ef564d134f5aa8779fd067af1c9
commit: 5a3d075a983c166a2a4294c272b47698e24c97c6 [5/11] mt6625l: include wifi-folder
Please take the patch only if it's a positive warning. Thanks!
btif_dma_plat.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
--- a/drivers/misc/mediatek/btif/common/btif_dma_plat.c
+++ b/drivers/misc/mediatek/btif/common/btif_dma_plat.c
@@ -390,7 +390,6 @@ int hal_btif_dma_clk_ctrl(P_MTK_DMA_INFO
int hal_btif_dma_hw_init(P_MTK_DMA_INFO_STR p_dma_info)
{
- int i_ret = 0;
unsigned int dat = 0;
unsigned long base = p_dma_info->base;
unsigned long addr_h = 0;
@@ -465,7 +464,7 @@ int hal_btif_dma_hw_init(P_MTK_DMA_INFO_
hal_btif_dma_ier_ctrl(p_dma_info, false);
}
- return i_ret;
+ return 0;
}
/*****************************************************************************
@@ -584,7 +583,6 @@ int btif_rx_dma_ctrl(P_MTK_DMA_INFO_STR
*****************************************************************************/
int hal_btif_vfifo_reset(P_MTK_DMA_INFO_STR p_dma_info)
{
- unsigned int i_ret = -1;
P_DMA_VFIFO p_vfifo = p_dma_info->p_vfifo;
P_MTK_BTIF_DMA_VFIFO p_mtk_dma_vfifo = container_of(p_vfifo,
MTK_BTIF_DMA_VFIFO,
@@ -596,7 +594,7 @@ int hal_btif_vfifo_reset(P_MTK_DMA_INFO_
p_mtk_dma_vfifo->wpt = 0;
p_mtk_dma_vfifo->last_wpt_wrap = 0;
BTIF_TRC_FUNC();
- return i_ret;
+ return -1;
}
/*****************************************************************************
@@ -1372,9 +1370,7 @@ int hal_dma_pm_ops(P_MTK_DMA_INFO_STR p_
int hal_dma_receive_data(P_MTK_DMA_INFO_STR p_dma_info,
unsigned char *p_buf, const unsigned int max_len)
{
- unsigned int i_ret = -1;
-
- return i_ret;
+ return -1;
}
#endif
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH] mt6625l: fix returnvar.cocci warnings
2020-07-06 6:41 [frank-w-bpi-r2-4.14:5.8-wifi 5/11] drivers/misc/mediatek/connectivity/common/common_detect/sdio_detect.c:88:34-35: WARNING: Use ARRAY_SIZE kernel test robot
` (4 preceding siblings ...)
2020-07-06 6:41 ` kernel test robot
@ 2020-07-06 6:41 ` kernel test robot
2020-07-06 6:41 ` kernel test robot
` (2 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2020-07-06 6:41 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2797 bytes --]
From: kernel test robot <lkp@intel.com>
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 <lkp@intel.com>
---
tree: https://github.com/frank-w/BPI-R2-4.14 5.8-wifi
head: 4b8951570a4f2ef564d134f5aa8779fd067af1c9
commit: 5a3d075a983c166a2a4294c272b47698e24c97c6 [5/11] mt6625l: include wifi-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 = 0;
-
if (p_btif_info->p_tx_fifo != 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_count)
{
- int i_ret = -1;
unsigned long base = p_btif->base;
unsigned int value = 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 = -1;
int idx = 0;
/*unsigned long irq_flag = 0;*/
unsigned long base = 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 = 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;
}
/*****************************************************************************
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH] mt6625l: fix returnvar.cocci warnings
2020-07-06 6:41 [frank-w-bpi-r2-4.14:5.8-wifi 5/11] drivers/misc/mediatek/connectivity/common/common_detect/sdio_detect.c:88:34-35: WARNING: Use ARRAY_SIZE kernel test robot
` (5 preceding siblings ...)
2020-07-06 6:41 ` kernel test robot
@ 2020-07-06 6:41 ` kernel test robot
2020-07-06 6:41 ` kernel test robot
2020-07-06 6:41 ` kernel test robot
8 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2020-07-06 6:41 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2213 bytes --]
From: kernel test robot <lkp@intel.com>
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 <lkp@intel.com>
---
tree: https://github.com/frank-w/BPI-R2-4.14 5.8-wifi
head: 4b8951570a4f2ef564d134f5aa8779fd067af1c9
commit: 5a3d075a983c166a2a4294c272b47698e24c97c6 [5/11] mt6625l: include wifi-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 = 0;
unsigned int eint_num = 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 = 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 = 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 = 0;
-
if (p_btif->tx_ctx == 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 = NULL;
}
}
- return i_ret;
+ return 0;
}
static int _btif_rx_btm_init(p_mtk_btif p_btif)
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH] mt6625l: fix returnvar.cocci warnings
2020-07-06 6:41 [frank-w-bpi-r2-4.14:5.8-wifi 5/11] drivers/misc/mediatek/connectivity/common/common_detect/sdio_detect.c:88:34-35: WARNING: Use ARRAY_SIZE kernel test robot
` (6 preceding siblings ...)
2020-07-06 6:41 ` kernel test robot
@ 2020-07-06 6:41 ` kernel test robot
2020-07-06 6:41 ` kernel test robot
8 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2020-07-06 6:41 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1148 bytes --]
From: kernel test robot <lkp@intel.com>
drivers/misc/mediatek/connectivity/common/conn_soc/linux/pub/osal.c:470:7-10: Unneeded variable: "ret". Return "0" on line 473
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 <lkp@intel.com>
---
tree: https://github.com/frank-w/BPI-R2-4.14 5.8-wifi
head: 4b8951570a4f2ef564d134f5aa8779fd067af1c9
commit: 5a3d075a983c166a2a4294c272b47698e24c97c6 [5/11] mt6625l: include wifi-folder
Please take the patch only if it's a positive warning. Thanks!
osal.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/drivers/misc/mediatek/connectivity/common/conn_soc/linux/pub/osal.c
+++ b/drivers/misc/mediatek/connectivity/common/conn_soc/linux/pub/osal.c
@@ -467,10 +467,8 @@ INT32 osal_wait_for_event_timeout(P_OSAL
INT32 osal_trigger_event(P_OSAL_EVENT pEvent)
{
- INT32 ret = 0;
-
wake_up_interruptible(&pEvent->waitQueue);
- return ret;
+ return 0;
}
INT32 osal_event_deinit(P_OSAL_EVENT pEvent)
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH] mt6625l: fix returnvar.cocci warnings
2020-07-06 6:41 [frank-w-bpi-r2-4.14:5.8-wifi 5/11] drivers/misc/mediatek/connectivity/common/common_detect/sdio_detect.c:88:34-35: WARNING: Use ARRAY_SIZE kernel test robot
` (7 preceding siblings ...)
2020-07-06 6:41 ` kernel test robot
@ 2020-07-06 6:41 ` kernel test robot
8 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2020-07-06 6:41 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1123 bytes --]
From: kernel test robot <lkp@intel.com>
drivers/misc/mediatek/connectivity/common/common_detect/wmt_gpio.c:352:7-11: Unneeded variable: "iret". Return "0" on line 370
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 <lkp@intel.com>
---
tree: https://github.com/frank-w/BPI-R2-4.14 5.8-wifi
head: 4b8951570a4f2ef564d134f5aa8779fd067af1c9
commit: 5a3d075a983c166a2a4294c272b47698e24c97c6 [5/11] mt6625l: include wifi-folder
Please take the patch only if it's a positive warning. Thanks!
wmt_gpio.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/misc/mediatek/connectivity/common/common_detect/wmt_gpio.c
+++ b/drivers/misc/mediatek/connectivity/common/common_detect/wmt_gpio.c
@@ -349,7 +349,6 @@ err:
INT32 wmt_gpio_deinit(VOID)
{
- INT32 iret = 0;
UINT32 i;
UINT32 j;
@@ -367,5 +366,5 @@ INT32 wmt_gpio_deinit(VOID)
gpio_ctrl_info.pinctrl_info = NULL;
}
- return iret;
+ return 0;
}
^ permalink raw reply [flat|nested] 11+ messages in thread