All of lore.kernel.org
 help / color / mirror / Atom feed
* [frank-w-bpi-r2-4.14:5.8-rc 5/38] drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/assoc.c:1549:44-45: WARNING: Use ARRAY_SIZE
@ 2020-07-12 12:19 kernel test robot
  2020-07-12 12:19 ` [PATCH] mt6625l: fix badzero.cocci warnings kernel test robot
                   ` (15 more replies)
  0 siblings, 16 replies; 23+ messages in thread
From: kernel test robot @ 2020-07-12 12:19 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6992 bytes --]

tree:   https://github.com/frank-w/BPI-R2-4.14 5.8-rc
head:   ca0d6f7786586ca7ba424d5967d780dd3c75748b
commit: 9a72d145abe49d9cb1e16d479b0b18caa20cdd71 [5/38] mt6625l: include wifi-folder
config: arm-randconfig-c023-20200712 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


coccinelle warnings: (new ones prefixed by >>)

>> drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/assoc.c:1549:44-45: WARNING: Use ARRAY_SIZE
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/auth.c:820:39-40: WARNING: Use ARRAY_SIZE
   drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/auth.c:389:37-38: WARNING: Use ARRAY_SIZE
   drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/auth.c:426:37-38: WARNING: Use ARRAY_SIZE
   drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/auth.c:483:37-38: WARNING: Use ARRAY_SIZE
   drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/auth.c:559:37-38: WARNING: Use ARRAY_SIZE
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_init.c:799:45-46: WARNING: Use ARRAY_SIZE
   drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_init.c:801:45-46: WARNING: Use ARRAY_SIZE
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_proc.c:899:31-32: WARNING: Use ARRAY_SIZE
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_wext.c:412:41-42: WARNING: Use ARRAY_SIZE
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/hem_mbox.c:610:29-30: WARNING: Use ARRAY_SIZE
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic.c:681:66-67: WARNING: Use ARRAY_SIZE
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_func.c:3176:38-39: WARNING: Use ARRAY_SIZE
   drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_func.c:3212:43-44: WARNING: Use ARRAY_SIZE
   drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_func.c:2927:42-43: WARNING: Use ARRAY_SIZE
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_ie.c:472:41-42: WARNING: Use ARRAY_SIZE
   drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_ie.c:507:46-47: WARNING: Use ARRAY_SIZE
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/scan.c:2062:42-43: WARNING: Use ARRAY_SIZE
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/swcr.c:970:38-39: WARNING: Use ARRAY_SIZE
   drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/swcr.c:947:36-37: WARNING: Use ARRAY_SIZE
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:4252:35-36: WARNING: Use ARRAY_SIZE
   drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:2677:55-56: WARNING: Use ARRAY_SIZE
   drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:2680:57-58: WARNING: Use ARRAY_SIZE
   drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:3361:43-44: WARNING: Use ARRAY_SIZE
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_cfg80211.c:1587:54-55: WARNING comparing pointer to 0
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p_cfg80211.c:999:54-55: WARNING comparing pointer to 0
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p_kal.c:1070:68-73: WARNING: conversion to bool not needed here
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_bow.c:328:1-3: ERROR: test of a variable/field address
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_rlm.c:414:7-15: ERROR: iterator variable bound on line 412 cannot be NULL
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_wext_priv.c:2821:12-19: WARNING opportunity for memdup_user
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/ais_fsm.c:4945:13-24: Unneeded variable: "rWlanStatus". Return "WLAN_STATUS_SUCCESS" on line 5003
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_kal.c:1356:13-20: Unneeded variable: "rStatus". Return "WLAN_STATUS_SUCCESS" on line 1368
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p.c:2435:5-13: Unneeded variable: "i4Status". Return "0" on line 2490
   drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p.c:2350:5-13: Unneeded variable: "i4Status". Return "0" on line 2411
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p_cfg80211.c:1607:5-11: Unneeded variable: "status". Return "0" on line 1688
   drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p_cfg80211.c:1795:5-11: Unneeded variable: "status". Return "0" on line 1848
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_wext_priv.c:2649:13-20: Unneeded variable: "rStatus". Return "WLAN_STATUS_SUCCESS" on line 2662
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_fsm.c:3012:13-20: Unneeded variable: "rStatus". Return "WLAN_STATUS_SUCCESS" on line 3022
>> drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_fsm.c:3068:13-24: Unneeded variable: "rWlanStatus". Return "WLAN_STATUS_SUCCESS" on line 3091
   drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_fsm.c:3036:13-24: Unneeded variable: "rWlanStatus". Return "WLAN_STATUS_SUCCESS" on line 3049
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_func.c:2056:9-26: Unneeded variable: "fgIsReplyProbeRsp". Return "FALSE" on line 2077
>> drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_func.c:1301:13-24: Unneeded variable: "rWlanStatus". Return "WLAN_STATUS_SUCCESS" on line 1373
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:1689:13-21: Unneeded variable: "u4Status". Return "WLAN_STATUS_SUCCESS" on line 1775
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c:5224:15-22: Unneeded variable: "rStatus". Return "WLAN_STATUS_SUCCESS" on line 5227
   drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c:5259:15-22: Unneeded variable: "rStatus". Return "WLAN_STATUS_SUCCESS" on line 5262
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_p2p.c:1259:13-24: Unneeded variable: "rWlanStatus". Return "WLAN_STATUS_SUCCESS" on line 1282
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_pwr_mgt.c:650:2-3: Unneeded semicolon
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_tx.c:1955:2-3: Unneeded semicolon
   drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_tx.c:1129:2-3: Unneeded semicolon
--
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:1719:4-5: Unneeded semicolon
   drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:3173:2-3: Unneeded semicolon
   drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:2994:2-3: Unneeded semicolon
   drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:2916:2-3: Unneeded semicolon
   drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:2646:2-3: Unneeded semicolon

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32059 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] mt6625l: fix badzero.cocci warnings
  2020-07-12 12:19 [frank-w-bpi-r2-4.14:5.8-rc 5/38] drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/assoc.c:1549:44-45: WARNING: Use ARRAY_SIZE kernel test robot
@ 2020-07-12 12:19 ` kernel test robot
  2020-07-12 12:19 ` kernel test robot
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: kernel test robot @ 2020-07-12 12:19 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1479 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_cfg80211.c:1587:54-55: WARNING comparing pointer to 0

 Compare pointer-typed values to NULL rather than 0

Semantic patch information:
 This makes an effort to choose between !x and x == NULL.  !x is used
 if it has previously been used with the function used to initialize x.
 This relies on type information.  More type information can be obtained
 using the option -all_includes and the option -I to specify an
 include path.

Generated by: scripts/coccinelle/null/badzero.cocci

Fixes: 9a72d145abe4 ("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-rc
head:   ca0d6f7786586ca7ba424d5967d780dd3c75748b
commit: 9a72d145abe49d9cb1e16d479b0b18caa20cdd71 [5/38] mt6625l: include wifi-folder

 gl_cfg80211.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_cfg80211.c
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_cfg80211.c
@@ -1584,7 +1584,7 @@ mtk_cfg80211_mgmt_tx(struct wiphy *wiphy
 		DBGLOG(REQ, TRACE, "--> %s()\n", __func__);
 #endif
 
-		if ((wiphy == NULL) || (wdev == NULL) || (params == 0) || (cookie == NULL))
+		if ((wiphy == NULL) || (wdev == NULL) || (params == NULL) || (cookie == NULL))
 			break;
 
 		prGlueInfo = (P_GLUE_INFO_T) wiphy_priv(wiphy);

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] mt6625l: fix badzero.cocci warnings
  2020-07-12 12:19 [frank-w-bpi-r2-4.14:5.8-rc 5/38] drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/assoc.c:1549:44-45: WARNING: Use ARRAY_SIZE kernel test robot
  2020-07-12 12:19 ` [PATCH] mt6625l: fix badzero.cocci warnings kernel test robot
@ 2020-07-12 12:19 ` kernel test robot
  2020-07-12 12:19 ` [PATCH] mt6625l: fix boolconv.cocci warnings kernel test robot
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: kernel test robot @ 2020-07-12 12:19 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1494 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p_cfg80211.c:999:54-55: WARNING comparing pointer to 0

 Compare pointer-typed values to NULL rather than 0

Semantic patch information:
 This makes an effort to choose between !x and x == NULL.  !x is used
 if it has previously been used with the function used to initialize x.
 This relies on type information.  More type information can be obtained
 using the option -all_includes and the option -I to specify an
 include path.

Generated by: scripts/coccinelle/null/badzero.cocci

Fixes: 9a72d145abe4 ("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-rc
head:   ca0d6f7786586ca7ba424d5967d780dd3c75748b
commit: 9a72d145abe49d9cb1e16d479b0b18caa20cdd71 [5/38] mt6625l: include wifi-folder

 gl_p2p_cfg80211.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p_cfg80211.c
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p_cfg80211.c
@@ -996,7 +996,7 @@ int mtk_p2p_cfg80211_mgmt_tx(struct wiph
 	PUINT_8 pucFrameBuf = (PUINT_8) NULL;
 
 	do {
-		if ((wiphy == NULL) || (wdev == NULL) || (params == 0) || (cookie == NULL))
+		if ((wiphy == NULL) || (wdev == NULL) || (params == NULL) || (cookie == NULL))
 			break;
 		/* DBGLOG(P2P, TRACE, ("mtk_p2p_cfg80211_mgmt_tx\n")); */
 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] mt6625l: fix boolconv.cocci warnings
  2020-07-12 12:19 [frank-w-bpi-r2-4.14:5.8-rc 5/38] drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/assoc.c:1549:44-45: WARNING: Use ARRAY_SIZE kernel test robot
  2020-07-12 12:19 ` [PATCH] mt6625l: fix badzero.cocci warnings kernel test robot
  2020-07-12 12:19 ` kernel test robot
@ 2020-07-12 12:19 ` kernel test robot
  2020-07-12 12:19 ` [PATCH] mt6625l: fix itnull.cocci warnings kernel test robot
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: kernel test robot @ 2020-07-12 12:19 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1423 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p_kal.c:1070:68-73: 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: 9a72d145abe4 ("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-rc
head:   ca0d6f7786586ca7ba424d5967d780dd3c75748b
commit: 9a72d145abe49d9cb1e16d479b0b18caa20cdd71 [5/38] mt6625l: include wifi-folder

Please take the patch only if it's a positive warning. Thanks!

 gl_p2p_kal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p_kal.c
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p_kal.c
@@ -1067,7 +1067,7 @@ kalP2PGCIndicateConnectionStatus(IN P_GL
 			/* Disconnect, what if u2StatusReason == 0? */
 			cfg80211_disconnected(prGlueP2pInfo->prDevHandler,	/* struct net_device * dev, */
 					      u2StatusReason, pucRxIEBuf, u2RxIELen, 
-					      eStatus == WLAN_STATUS_MEDIA_DISCONNECT_LOCALLY ? true : false,
+					      eStatus == WLAN_STATUS_MEDIA_DISCONNECT_LOCALLY,
 					      GFP_KERNEL);
 		}
 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] mt6625l: fix itnull.cocci warnings
  2020-07-12 12:19 [frank-w-bpi-r2-4.14:5.8-rc 5/38] drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/assoc.c:1549:44-45: WARNING: Use ARRAY_SIZE kernel test robot
                   ` (2 preceding siblings ...)
  2020-07-12 12:19 ` [PATCH] mt6625l: fix boolconv.cocci warnings kernel test robot
@ 2020-07-12 12:19 ` kernel test robot
  2020-07-12 12:19 ` [PATCH] mt6625l: fix returnvar.cocci warnings kernel test robot
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: kernel test robot @ 2020-07-12 12:19 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1677 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_rlm.c:414:7-15: ERROR: iterator variable bound on line 412 cannot be NULL

 Many iterators have the property that the first argument is always bound
 to a real list element, never NULL.

Semantic patch information:
 False positives arise for some iterators that do not have this property,
 or in cases when the loop cursor is reassigned.  The latter should only
 happen when the matched code is on the way to a loop exit (break, goto,
 or return).

Generated by: scripts/coccinelle/iterators/itnull.cocci

Fixes: 9a72d145abe4 ("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-rc
head:   ca0d6f7786586ca7ba424d5967d780dd3c75748b
commit: 9a72d145abe49d9cb1e16d479b0b18caa20cdd71 [5/38] mt6625l: include wifi-folder

Please take the patch only if it's a positive warning. Thanks!

 p2p_rlm.c |    4 ----
 1 file changed, 4 deletions(-)

--- a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_rlm.c
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_rlm.c
@@ -411,10 +411,6 @@ VOID rlmUpdateParamsForAP(P_ADAPTER_T pr
 
 	LINK_FOR_EACH_ENTRY(prStaRec, prStaList, rLinkEntry, STA_RECORD_T) {
 		/* ASSERT(prStaRec); */
-		if (!prStaRec) {
-			DBGLOG(P2P, TRACE, "prStaRec is NULL in rlmUpdateParamsForAP()\n");
-			break;
-		}
 		if (prStaRec->fgIsInUse && prStaRec->ucStaState == STA_STATE_3 &&
 		    prStaRec->ucNetTypeIndex == prBssInfo->ucNetTypeIndex) {
 			if (!(prStaRec->ucPhyTypeSet & (PHY_TYPE_SET_802_11GN | PHY_TYPE_SET_802_11A))) {

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] mt6625l: fix returnvar.cocci warnings
  2020-07-12 12:19 [frank-w-bpi-r2-4.14:5.8-rc 5/38] drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/assoc.c:1549:44-45: WARNING: Use ARRAY_SIZE kernel test robot
                   ` (3 preceding siblings ...)
  2020-07-12 12:19 ` [PATCH] mt6625l: fix itnull.cocci warnings kernel test robot
@ 2020-07-12 12:19 ` kernel test robot
  2020-07-12 12:19 ` kernel test robot
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: kernel test robot @ 2020-07-12 12:19 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1557 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/ais_fsm.c:4945:13-24: Unneeded variable: "rWlanStatus". Return "WLAN_STATUS_SUCCESS" on line 5003


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 9a72d145abe4 ("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-rc
head:   ca0d6f7786586ca7ba424d5967d780dd3c75748b
commit: 9a72d145abe49d9cb1e16d479b0b18caa20cdd71 [5/38] mt6625l: include wifi-folder

Please take the patch only if it's a positive warning. Thanks!

 ais_fsm.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/ais_fsm.c
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/ais_fsm.c
@@ -4942,7 +4942,6 @@ WLAN_STATUS
 aisFuncTxMgmtFrame(IN P_ADAPTER_T prAdapter,
 		   IN P_AIS_MGMT_TX_REQ_INFO_T prMgmtTxReqInfo, IN P_MSDU_INFO_T prMgmtTxMsdu, IN UINT_64 u8Cookie)
 {
-	WLAN_STATUS rWlanStatus = WLAN_STATUS_SUCCESS;
 	P_MSDU_INFO_T prTxMsduInfo = (P_MSDU_INFO_T) NULL;
 	P_WLAN_MAC_HEADER_T prWlanHdr = (P_WLAN_MAC_HEADER_T) NULL;
 	P_STA_RECORD_T prStaRec = (P_STA_RECORD_T) NULL;
@@ -5000,7 +4999,7 @@ aisFuncTxMgmtFrame(IN P_ADAPTER_T prAdap
 
 	} while (FALSE);
 
-	return rWlanStatus;
+	return WLAN_STATUS_SUCCESS;
 }				/* aisFuncTxMgmtFrame */
 
 /*----------------------------------------------------------------------------*/

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] mt6625l: fix returnvar.cocci warnings
  2020-07-12 12:19 [frank-w-bpi-r2-4.14:5.8-rc 5/38] drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/assoc.c:1549:44-45: WARNING: Use ARRAY_SIZE kernel test robot
                   ` (4 preceding siblings ...)
  2020-07-12 12:19 ` [PATCH] mt6625l: fix returnvar.cocci warnings kernel test robot
@ 2020-07-12 12:19 ` kernel test robot
  2020-07-12 12:19 ` kernel test robot
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: kernel test robot @ 2020-07-12 12:19 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1417 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_kal.c:1356:13-20: Unneeded variable: "rStatus". Return "WLAN_STATUS_SUCCESS" on line 1368


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 9a72d145abe4 ("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-rc
head:   ca0d6f7786586ca7ba424d5967d780dd3c75748b
commit: 9a72d145abe49d9cb1e16d479b0b18caa20cdd71 [5/38] mt6625l: include wifi-folder

Please take the patch only if it's a positive warning. Thanks!

 gl_kal.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_kal.c
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_kal.c
@@ -1353,7 +1353,6 @@ kalProcessRxPacket(IN P_GLUE_INFO_T prGl
 		   /* IN PBOOLEAN           pfgIsRetain, */
 		   IN BOOLEAN fgIsRetain, IN ENUM_CSUM_RESULT_T aerCSUM[])
 {
-	WLAN_STATUS rStatus = WLAN_STATUS_SUCCESS;
 	struct sk_buff *skb = (struct sk_buff *)pvPacket;
 
 	skb->data = pucPacketStart;
@@ -1365,7 +1364,7 @@ kalProcessRxPacket(IN P_GLUE_INFO_T prGl
 	kalUpdateRxCSUMOffloadParam(skb, aerCSUM);
 #endif
 
-	return rStatus;
+	return WLAN_STATUS_SUCCESS;
 }
 
 #if (CONF_HIF_LOOPBACK_AUTO == 1)

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] mt6625l: fix returnvar.cocci warnings
  2020-07-12 12:19 [frank-w-bpi-r2-4.14:5.8-rc 5/38] drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/assoc.c:1549:44-45: WARNING: Use ARRAY_SIZE kernel test robot
                   ` (5 preceding siblings ...)
  2020-07-12 12:19 ` kernel test robot
@ 2020-07-12 12:19 ` kernel test robot
  2020-07-12 12:19 ` kernel test robot
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: kernel test robot @ 2020-07-12 12:19 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1910 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p.c:2435:5-13: Unneeded variable: "i4Status". Return "0" on line 2490
drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p.c:2350:5-13: Unneeded variable: "i4Status". Return "0" on line 2411


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 9a72d145abe4 ("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-rc
head:   ca0d6f7786586ca7ba424d5967d780dd3c75748b
commit: 9a72d145abe49d9cb1e16d479b0b18caa20cdd71 [5/38] mt6625l: include wifi-folder

Please take the patch only if it's a positive warning. Thanks!

 gl_p2p.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p.c
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p.c
@@ -2347,7 +2347,6 @@ int
 mtk_p2p_wext_invitation_request(IN struct net_device *prDev,
 				IN struct iw_request_info *info, IN OUT union iwreq_data *wrqu, IN OUT char *extra)
 {
-	int i4Status = 0;
 #if 0
 	P_ADAPTER_T prAdapter = (P_ADAPTER_T) NULL;
 	P_GLUE_INFO_T prGlueInfo = (P_GLUE_INFO_T) NULL;
@@ -2408,7 +2407,7 @@ mtk_p2p_wext_invitation_request(IN struc
 	} while (FALSE);
 #endif
 
-	return i4Status;
+	return 0;
 
 }
 
@@ -2432,7 +2431,6 @@ int
 mtk_p2p_wext_invitation_abort(IN struct net_device *prDev,
 			      IN struct iw_request_info *info, IN OUT union iwreq_data *wrqu, IN OUT char *extra)
 {
-	int i4Status = 0;
 #if 0
 	P_ADAPTER_T prAdapter = (P_ADAPTER_T) NULL;
 	P_GLUE_INFO_T prGlueInfo = (P_GLUE_INFO_T) NULL;
@@ -2487,7 +2485,7 @@ mtk_p2p_wext_invitation_abort(IN struct
 	} while (FALSE);
 #endif
 
-	return i4Status;
+	return 0;
 
 }
 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] mt6625l: fix returnvar.cocci warnings
  2020-07-12 12:19 [frank-w-bpi-r2-4.14:5.8-rc 5/38] drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/assoc.c:1549:44-45: WARNING: Use ARRAY_SIZE kernel test robot
                   ` (6 preceding siblings ...)
  2020-07-12 12:19 ` kernel test robot
@ 2020-07-12 12:19 ` kernel test robot
  2020-07-12 12:19 ` kernel test robot
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: kernel test robot @ 2020-07-12 12:19 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1530 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_wext_priv.c:2649:13-20: Unneeded variable: "rStatus". Return "WLAN_STATUS_SUCCESS" on line 2662


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 9a72d145abe4 ("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-rc
head:   ca0d6f7786586ca7ba424d5967d780dd3c75748b
commit: 9a72d145abe49d9cb1e16d479b0b18caa20cdd71 [5/38] mt6625l: include wifi-folder

Please take the patch only if it's a positive warning. Thanks!

 gl_wext_priv.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_wext_priv.c
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_wext_priv.c
@@ -2646,8 +2646,6 @@ static WLAN_STATUS
 reqExtSetAcpiDevicePowerState(IN P_GLUE_INFO_T prGlueInfo,
 			      IN PVOID pvSetBuffer, IN UINT_32 u4SetBufferLen, OUT PUINT_32 pu4SetInfoLen)
 {
-	WLAN_STATUS rStatus = WLAN_STATUS_SUCCESS;
-
 	ASSERT(prGlueInfo);
 	ASSERT(pvSetBuffer);
 	ASSERT(pu4SetInfoLen);
@@ -2659,7 +2657,7 @@ reqExtSetAcpiDevicePowerState(IN P_GLUE_
 	/* pvSetBuffer, */
 	/* u4SetBufferLen, */
 	/* pu4SetInfoLen); */
-	return rStatus;
+	return WLAN_STATUS_SUCCESS;
 }
 
 int priv_driver_set_chip_config(IN struct net_device *prNetDev, IN char *pcCommand, IN int i4TotalLen)

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] mt6625l: fix returnvar.cocci warnings
  2020-07-12 12:19 [frank-w-bpi-r2-4.14:5.8-rc 5/38] drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/assoc.c:1549:44-45: WARNING: Use ARRAY_SIZE kernel test robot
                   ` (7 preceding siblings ...)
  2020-07-12 12:19 ` kernel test robot
@ 2020-07-12 12:19 ` kernel test robot
  2020-07-12 12:19 ` kernel test robot
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: kernel test robot @ 2020-07-12 12:19 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3238 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_fsm.c:3012:13-20: Unneeded variable: "rStatus". Return "WLAN_STATUS_SUCCESS" on line 3022
drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_fsm.c:3068:13-24: Unneeded variable: "rWlanStatus". Return "WLAN_STATUS_SUCCESS" on line 3091
drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_fsm.c:3036:13-24: Unneeded variable: "rWlanStatus". Return "WLAN_STATUS_SUCCESS" on line 3049


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 9a72d145abe4 ("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-rc
head:   ca0d6f7786586ca7ba424d5967d780dd3c75748b
commit: 9a72d145abe49d9cb1e16d479b0b18caa20cdd71 [5/38] mt6625l: include wifi-folder

Please take the patch only if it's a positive warning. Thanks!

 p2p_fsm.c |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

--- a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_fsm.c
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_fsm.c
@@ -3009,8 +3009,6 @@ WLAN_STATUS p2pRunEventAAAComplete(IN P_
 /*----------------------------------------------------------------------------*/
 WLAN_STATUS p2pRunEventAAASuccess(IN P_ADAPTER_T prAdapter, IN P_STA_RECORD_T prStaRec)
 {
-	WLAN_STATUS rStatus = WLAN_STATUS_SUCCESS;
-
 	do {
 		ASSERT_BREAK((prAdapter != NULL) && (prStaRec != NULL));
 
@@ -3019,7 +3017,7 @@ WLAN_STATUS p2pRunEventAAASuccess(IN P_A
 
 	} while (FALSE);
 
-	return rStatus;
+	return WLAN_STATUS_SUCCESS;
 }				/* p2pRunEventAAASuccess */
 
 /*----------------------------------------------------------------------------*/
@@ -3033,7 +3031,6 @@ WLAN_STATUS p2pRunEventAAASuccess(IN P_A
 /*----------------------------------------------------------------------------*/
 WLAN_STATUS p2pRxPublicActionFrame(IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb)
 {
-	WLAN_STATUS rWlanStatus = WLAN_STATUS_SUCCESS;
 	P_P2P_PUBLIC_ACTION_FRAME_T prPublicActionFrame = (P_P2P_PUBLIC_ACTION_FRAME_T) NULL;
 	P_P2P_FSM_INFO_T prP2pFsmInfo = (P_P2P_FSM_INFO_T) NULL;
 
@@ -3046,7 +3043,7 @@ WLAN_STATUS p2pRxPublicActionFrame(IN P_
 	DBGLOG(P2P, TRACE, "RX Public Action Frame Token:%d.\n", prPublicActionFrame->ucDialogToken);
 
 	if (prPublicActionFrame->ucCategory != CATEGORY_PUBLIC_ACTION)
-		return rWlanStatus;
+		return WLAN_STATUS_SUCCESS;
 
 	switch (prPublicActionFrame->ucAction) {
 	case ACTION_PUBLIC_WIFI_DIRECT:
@@ -3060,12 +3057,11 @@ WLAN_STATUS p2pRxPublicActionFrame(IN P_
 		break;
 	}
 
-	return rWlanStatus;
+	return WLAN_STATUS_SUCCESS;
 }				/* p2pRxPublicActionFrame */
 
 WLAN_STATUS p2pRxActionFrame(IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb)
 {
-	WLAN_STATUS rWlanStatus = WLAN_STATUS_SUCCESS;
 	P_P2P_ACTION_FRAME_T prP2pActionFrame = (P_P2P_ACTION_FRAME_T) NULL;
 	UINT_8 aucOui[3] = VENDOR_OUI_WFA_SPECIFIC;
 
@@ -3088,7 +3084,7 @@ WLAN_STATUS p2pRxActionFrame(IN P_ADAPTE
 
 	} while (FALSE);
 
-	return rWlanStatus;
+	return WLAN_STATUS_SUCCESS;
 }				/* p2pRxActionFrame */
 
 VOID

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] mt6625l: fix returnvar.cocci warnings
  2020-07-12 12:19 [frank-w-bpi-r2-4.14:5.8-rc 5/38] drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/assoc.c:1549:44-45: WARNING: Use ARRAY_SIZE kernel test robot
                   ` (8 preceding siblings ...)
  2020-07-12 12:19 ` kernel test robot
@ 2020-07-12 12:19 ` kernel test robot
  2020-07-12 12:19 ` kernel test robot
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: kernel test robot @ 2020-07-12 12:19 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2308 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_func.c:2056:9-26: Unneeded variable: "fgIsReplyProbeRsp". Return "FALSE" on line 2077
drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_func.c:1301:13-24: Unneeded variable: "rWlanStatus". Return "WLAN_STATUS_SUCCESS" on line 1373


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 9a72d145abe4 ("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-rc
head:   ca0d6f7786586ca7ba424d5967d780dd3c75748b
commit: 9a72d145abe49d9cb1e16d479b0b18caa20cdd71 [5/38] mt6625l: include wifi-folder

Please take the patch only if it's a positive warning. Thanks!

 p2p_func.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_func.c
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_func.c
@@ -1298,7 +1298,6 @@ WLAN_STATUS
 p2pFuncTxMgmtFrame(IN P_ADAPTER_T prAdapter,
 		   IN P_P2P_MGMT_TX_REQ_INFO_T prMgmtTxReqInfo, IN P_MSDU_INFO_T prMgmtTxMsdu, IN UINT_64 u8Cookie)
 {
-	WLAN_STATUS rWlanStatus = WLAN_STATUS_SUCCESS;
 	P_MSDU_INFO_T prTxMsduInfo = (P_MSDU_INFO_T) NULL;
 	P_WLAN_MAC_HEADER_T prWlanHdr = (P_WLAN_MAC_HEADER_T) NULL;
 	P_STA_RECORD_T prStaRec = (P_STA_RECORD_T) NULL;
@@ -1370,7 +1369,7 @@ p2pFuncTxMgmtFrame(IN P_ADAPTER_T prAdap
 
 	} while (FALSE);
 
-	return rWlanStatus;
+	return WLAN_STATUS_SUCCESS;
 }				/* p2pFuncTxMgmtFrame */
 
 VOID p2pFuncSetChannel(IN P_ADAPTER_T prAdapter, IN P_RF_CHANNEL_INFO_T prRfChannelInfo)
@@ -2053,7 +2052,6 @@ BOOLEAN p2pFuncParseCheckForP2PInfoElem(
 /*----------------------------------------------------------------------------*/
 BOOLEAN p2pFuncValidateProbeReq(IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb, OUT PUINT_32 pu4ControlFlags)
 {
-	BOOLEAN fgIsReplyProbeRsp = FALSE;
 	P_P2P_FSM_INFO_T prP2pFsmInfo = (P_P2P_FSM_INFO_T) NULL;
 
 	DEBUGFUNC("p2pFuncValidateProbeReq");
@@ -2074,7 +2072,7 @@ BOOLEAN p2pFuncValidateProbeReq(IN P_ADA
 
 	} while (FALSE);
 
-	return fgIsReplyProbeRsp;
+	return FALSE;
 
 }				/* end of p2pFuncValidateProbeReq() */
 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] mt6625l: fix returnvar.cocci warnings
  2020-07-12 12:19 [frank-w-bpi-r2-4.14:5.8-rc 5/38] drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/assoc.c:1549:44-45: WARNING: Use ARRAY_SIZE kernel test robot
                   ` (9 preceding siblings ...)
  2020-07-12 12:19 ` kernel test robot
@ 2020-07-12 12:19 ` kernel test robot
  2020-07-12 12:19 ` kernel test robot
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: kernel test robot @ 2020-07-12 12:19 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:1689:13-21: Unneeded variable: "u4Status". Return "WLAN_STATUS_SUCCESS" on line 1775


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 9a72d145abe4 ("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-rc
head:   ca0d6f7786586ca7ba424d5967d780dd3c75748b
commit: 9a72d145abe49d9cb1e16d479b0b18caa20cdd71 [5/38] mt6625l: include wifi-folder

Please take the patch only if it's a positive warning. Thanks!

 wlan_lib.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c
@@ -1686,7 +1686,6 @@ wlanAdapterStart(IN P_ADAPTER_T prAdapte
 WLAN_STATUS wlanAdapterStop(IN P_ADAPTER_T prAdapter)
 {
 	UINT_32 i, u4Value = 0;
-	WLAN_STATUS u4Status = WLAN_STATUS_SUCCESS;
 
 	ASSERT(prAdapter);
 
@@ -1772,7 +1771,7 @@ WLAN_STATUS wlanAdapterStop(IN P_ADAPTER
 	nicRestoreSpiDefMode(prAdapter);
 #endif
 
-	return u4Status;
+	return WLAN_STATUS_SUCCESS;
 }				/* wlanAdapterStop */
 
 #if 0

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] mt6625l: fix returnvar.cocci warnings
  2020-07-12 12:19 [frank-w-bpi-r2-4.14:5.8-rc 5/38] drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/assoc.c:1549:44-45: WARNING: Use ARRAY_SIZE kernel test robot
                   ` (10 preceding siblings ...)
  2020-07-12 12:19 ` kernel test robot
@ 2020-07-12 12:19 ` kernel test robot
  2020-07-12 12:19 ` kernel test robot
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: kernel test robot @ 2020-07-12 12:19 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1934 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c:5224:15-22: Unneeded variable: "rStatus". Return "WLAN_STATUS_SUCCESS" on line 5227
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c:5259:15-22: Unneeded variable: "rStatus". Return "WLAN_STATUS_SUCCESS" on line 5262


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 9a72d145abe4 ("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-rc
head:   ca0d6f7786586ca7ba424d5967d780dd3c75748b
commit: 9a72d145abe49d9cb1e16d479b0b18caa20cdd71 [5/38] mt6625l: include wifi-folder

Please take the patch only if it's a positive warning. Thanks!

 wlan_oid.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c
@@ -5221,10 +5221,9 @@ wlanoidSetMcrWrite(IN P_ADAPTER_T prAdap
 #if 1
 		/* low power test special command */
 		if (prMcrWrInfo->u4McrOffset == 0x11111110) {
-			WLAN_STATUS rStatus = WLAN_STATUS_SUCCESS;
 			/* DbgPrint("Enter test mode\n"); */
 			prAdapter->fgTestMode = TRUE;
-			return rStatus;
+			return WLAN_STATUS_SUCCESS;
 		}
 		if (prMcrWrInfo->u4McrOffset == 0x11111111) {
 			/* DbgPrint("nicpmSetAcpiPowerD3\n"); */
@@ -5256,10 +5255,9 @@ wlanoidSetMcrWrite(IN P_ADAPTER_T prAdap
 #if 1
 		/* low power test special command */
 		if (prMcrWrInfo->u4McrOffset == 0x11111110) {
-			WLAN_STATUS rStatus = WLAN_STATUS_SUCCESS;
 			/* DbgPrint("Enter test mode\n"); */
 			prAdapter->fgTestMode = TRUE;
-			return rStatus;
+			return WLAN_STATUS_SUCCESS;
 		}
 		if (prMcrWrInfo->u4McrOffset == 0x11111111) {
 			/* DbgPrint("nicpmSetAcpiPowerD3\n"); */

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] mt6625l: fix returnvar.cocci warnings
  2020-07-12 12:19 [frank-w-bpi-r2-4.14:5.8-rc 5/38] drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/assoc.c:1549:44-45: WARNING: Use ARRAY_SIZE kernel test robot
                   ` (11 preceding siblings ...)
  2020-07-12 12:19 ` kernel test robot
@ 2020-07-12 12:19 ` kernel test robot
  2020-07-12 12:19 ` [PATCH] mt6625l: fix semicolon.cocci warnings kernel test robot
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: kernel test robot @ 2020-07-12 12:19 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1567 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_p2p.c:1259:13-24: Unneeded variable: "rWlanStatus". Return "WLAN_STATUS_SUCCESS" on line 1282


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 9a72d145abe4 ("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-rc
head:   ca0d6f7786586ca7ba424d5967d780dd3c75748b
commit: 9a72d145abe49d9cb1e16d479b0b18caa20cdd71 [5/38] mt6625l: include wifi-folder

Please take the patch only if it's a positive warning. Thanks!

 wlan_p2p.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_p2p.c
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_p2p.c
@@ -1256,7 +1256,6 @@ WLAN_STATUS
 wlanoidGetSecCheckResponse(IN P_ADAPTER_T prAdapter,
 			   IN PVOID pvQueryBuffer, IN UINT_32 u4QueryBufferLen, OUT PUINT_32 pu4QueryInfoLen)
 {
-	WLAN_STATUS rWlanStatus = WLAN_STATUS_SUCCESS;
 	/* P_WLAN_MAC_HEADER_T prWlanHdr = (P_WLAN_MAC_HEADER_T)NULL; */
 	P_GLUE_INFO_T prGlueInfo;
 
@@ -1279,7 +1278,7 @@ wlanoidGetSecCheckResponse(IN P_ADAPTER_
 	kalMemCopy((PUINT_8) (pvQueryBuffer + OFFSET_OF(IW_P2P_TRANSPORT_STRUCT, aucBuffer)),
 		   prGlueInfo->prP2PInfo->aucSecCheckRsp, u4QueryBufferLen);
 
-	return rWlanStatus;
+	return WLAN_STATUS_SUCCESS;
 }				/* end of wlanoidGetSecCheckResponse() */
 #endif
 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] mt6625l: fix semicolon.cocci warnings
  2020-07-12 12:19 [frank-w-bpi-r2-4.14:5.8-rc 5/38] drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/assoc.c:1549:44-45: WARNING: Use ARRAY_SIZE kernel test robot
                   ` (12 preceding siblings ...)
  2020-07-12 12:19 ` kernel test robot
@ 2020-07-12 12:19 ` kernel test robot
  2020-07-12 12:19 ` kernel test robot
  2020-07-12 12:19 ` kernel test robot
  15 siblings, 0 replies; 23+ messages in thread
From: kernel test robot @ 2020-07-12 12:19 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 992 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_pwr_mgt.c:650:2-3: Unneeded semicolon


 Remove unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

Fixes: 9a72d145abe4 ("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-rc
head:   ca0d6f7786586ca7ba424d5967d780dd3c75748b
commit: 9a72d145abe49d9cb1e16d479b0b18caa20cdd71 [5/38] mt6625l: include wifi-folder

 nic_pwr_mgt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_pwr_mgt.c
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_pwr_mgt.c
@@ -647,7 +647,7 @@ BOOLEAN nicpmSetAcpiPowerD3(IN P_ADAPTER
 	i = 0;
 	while (i < CFG_IST_LOOP_COUNT && nicProcessIST(prAdapter) != WLAN_STATUS_NOT_INDICATING) {
 		i++;
-	};
+	}
 
 	/* 5. Remove pending TX */
 	nicTxRelease(prAdapter);

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] mt6625l: fix semicolon.cocci warnings
  2020-07-12 12:19 [frank-w-bpi-r2-4.14:5.8-rc 5/38] drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/assoc.c:1549:44-45: WARNING: Use ARRAY_SIZE kernel test robot
                   ` (13 preceding siblings ...)
  2020-07-12 12:19 ` [PATCH] mt6625l: fix semicolon.cocci warnings kernel test robot
@ 2020-07-12 12:19 ` kernel test robot
  2020-07-12 12:19 ` kernel test robot
  15 siblings, 0 replies; 23+ messages in thread
From: kernel test robot @ 2020-07-12 12:19 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1291 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_tx.c:1955:2-3: Unneeded semicolon
drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_tx.c:1129:2-3: Unneeded semicolon


 Remove unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

Fixes: 9a72d145abe4 ("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-rc
head:   ca0d6f7786586ca7ba424d5967d780dd3c75748b
commit: 9a72d145abe49d9cb1e16d479b0b18caa20cdd71 [5/38] mt6625l: include wifi-folder

 nic_tx.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_tx.c
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_tx.c
@@ -1126,7 +1126,7 @@ VOID nicTxReturnMsduInfoProfiling(IN P_A
 		}
 
 		prMsduInfo = prNextMsduInfo;
-	};
+	}
 
 #if CFG_PRINT_RTP_PROFILE
 	/* 4 4. record the lifetime of current round last pkt */
@@ -1952,7 +1952,7 @@ VOID nicTxReturnMsduInfo(IN P_ADAPTER_T
 		QUEUE_INSERT_TAIL(&prTxCtrl->rFreeMsduInfoList, (P_QUE_ENTRY_T) prMsduInfo);
 		KAL_RELEASE_SPIN_LOCK(prAdapter, SPIN_LOCK_TX_MSDU_INFO_LIST);
 		prMsduInfo = prNextMsduInfo;
-	};
+	}
 
 }
 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] mt6625l: fix semicolon.cocci warnings
  2020-07-12 12:19 [frank-w-bpi-r2-4.14:5.8-rc 5/38] drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/assoc.c:1549:44-45: WARNING: Use ARRAY_SIZE kernel test robot
                   ` (14 preceding siblings ...)
  2020-07-12 12:19 ` kernel test robot
@ 2020-07-12 12:19 ` kernel test robot
  15 siblings, 0 replies; 23+ messages in thread
From: kernel test robot @ 2020-07-12 12:19 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2069 bytes --]

From: kernel test robot <lkp@intel.com>

drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:1719:4-5: Unneeded semicolon
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:3173:2-3: Unneeded semicolon
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:2994:2-3: Unneeded semicolon
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:2916:2-3: Unneeded semicolon
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:2646:2-3: Unneeded semicolon


 Remove unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

Fixes: 9a72d145abe4 ("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-rc
head:   ca0d6f7786586ca7ba424d5967d780dd3c75748b
commit: 9a72d145abe49d9cb1e16d479b0b18caa20cdd71 [5/38] mt6625l: include wifi-folder

 wlan_lib.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--- a/drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c
@@ -1716,7 +1716,7 @@ WLAN_STATUS wlanAdapterStop(IN P_ADAPTER
 			i = 0;
 			while (i < CFG_IST_LOOP_COUNT && nicProcessIST(prAdapter) != WLAN_STATUS_NOT_INDICATING) {
 				i++;
-			};
+			}
 
 			/* 3. Wait til RDY bit has been cleaerd */
 			i = 0;
@@ -2643,7 +2643,7 @@ WLAN_STATUS wlanSendNicPowerCtrlCmd(IN P
 		}
 
 		break;
-	};
+	}
 
 	/* 4. Free CMD Info Packet. */
 	cmdBufFreeCmdInfo(prAdapter, prCmdInfo);
@@ -2913,7 +2913,7 @@ wlanImageSectionDownload(IN P_ADAPTER_T
 		}
 
 		break;
-	};
+	}
 
 #if CFG_ENABLE_FW_DOWNLOAD_ACK
 	/* 7. Wait for INIT_EVENT_ID_CMD_RESULT */
@@ -2991,7 +2991,7 @@ WLAN_STATUS wlanImageQueryStatus(IN P_AD
 		}
 
 		break;
-	};
+	}
 
 	/* 6. Wait for INIT_EVENT_ID_PENDING_ERROR */
 	do {
@@ -3170,7 +3170,7 @@ WLAN_STATUS wlanConfigWifiFunc(IN P_ADAP
 		}
 
 		break;
-	};
+	}
 
 	/* 6. Free CMD Info Packet. */
 	cmdBufFreeCmdInfo(prAdapter, prCmdInfo);

^ permalink raw reply	[flat|nested] 23+ 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
  5 siblings, 0 replies; 23+ 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] 23+ 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 ` kernel test robot
@ 2020-07-06  6:41 ` kernel test robot
  2020-07-06  6:41 ` kernel test robot
  5 siblings, 0 replies; 23+ 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] 23+ 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 ` 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
  5 siblings, 0 replies; 23+ 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] 23+ 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
  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
  2020-07-06  6:41 ` kernel test robot
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 23+ 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] 23+ 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
  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)
  5 siblings, 0 replies; 23+ 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] 23+ 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
@ 2020-07-06  6:41 ` kernel test robot
  2020-07-06  6:41 ` kernel test robot
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 23+ 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] 23+ messages in thread

end of thread, other threads:[~2020-07-12 12:19 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-12 12:19 [frank-w-bpi-r2-4.14:5.8-rc 5/38] drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/assoc.c:1549:44-45: WARNING: Use ARRAY_SIZE kernel test robot
2020-07-12 12:19 ` [PATCH] mt6625l: fix badzero.cocci warnings kernel test robot
2020-07-12 12:19 ` kernel test robot
2020-07-12 12:19 ` [PATCH] mt6625l: fix boolconv.cocci warnings kernel test robot
2020-07-12 12:19 ` [PATCH] mt6625l: fix itnull.cocci warnings kernel test robot
2020-07-12 12:19 ` [PATCH] mt6625l: fix returnvar.cocci warnings kernel test robot
2020-07-12 12:19 ` kernel test robot
2020-07-12 12:19 ` kernel test robot
2020-07-12 12:19 ` kernel test robot
2020-07-12 12:19 ` kernel test robot
2020-07-12 12:19 ` kernel test robot
2020-07-12 12:19 ` kernel test robot
2020-07-12 12:19 ` kernel test robot
2020-07-12 12:19 ` kernel test robot
2020-07-12 12:19 ` [PATCH] mt6625l: fix semicolon.cocci warnings kernel test robot
2020-07-12 12:19 ` kernel test robot
2020-07-12 12:19 ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
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 returnvar.cocci warnings 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
2020-07-06  6:41 ` kernel test robot
2020-07-06  6:41 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.