All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [PATCH] mt6625l: fix returnvar.cocci warnings
Date: Sun, 12 Jul 2020 20:19:17 +0800	[thread overview]
Message-ID: <20200712121917.GA72958@f669aaa75a90> (raw)
In-Reply-To: <202007122043.encHIg4V%lkp@intel.com>

[-- 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() */
 

  parent reply	other threads:[~2020-07-12 12:19 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200712121917.GA72958@f669aaa75a90 \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.