From: Simran Singhal <singhalsimran0@gmail.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com Subject: [PATCH] staging: rtl8723bs: hal: Compress return logic Date: Thu, 26 Mar 2020 03:13:12 +0530 [thread overview] Message-ID: <20200325214312.GA1936@simran-Inspiron-5558> (raw) Simplify function returns by merging assignment and return into one command line. Found with Coccinelle @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Simran Singhal <singhalsimran0@gmail.com> --- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index eb7de3617d83..767e2a784f78 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1498,9 +1498,7 @@ s8 PHY_GetTxPowerByRate( return value; } - value = pHalData->TxPwrByRateOffset[Band][RFPath][TxNum][rateIndex]; - - return value; + return pHalData->TxPwrByRateOffset[Band][RFPath][TxNum][rateIndex]; } -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Simran Singhal <singhalsimran0@gmail.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com Subject: [PATCH] staging: rtl8723bs: hal: Compress return logic Date: Thu, 26 Mar 2020 03:13:12 +0530 [thread overview] Message-ID: <20200325214312.GA1936@simran-Inspiron-5558> (raw) Simplify function returns by merging assignment and return into one command line. Found with Coccinelle @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Simran Singhal <singhalsimran0@gmail.com> --- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index eb7de3617d83..767e2a784f78 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1498,9 +1498,7 @@ s8 PHY_GetTxPowerByRate( return value; } - value = pHalData->TxPwrByRateOffset[Band][RFPath][TxNum][rateIndex]; - - return value; + return pHalData->TxPwrByRateOffset[Band][RFPath][TxNum][rateIndex]; } -- 2.17.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next reply other threads:[~2020-03-25 21:43 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-25 21:43 Simran Singhal [this message] 2020-03-25 21:43 ` [PATCH] staging: rtl8723bs: hal: Compress return logic Simran Singhal 2020-03-26 18:27 ` [Outreachy kernel] " Lakshmi Ramasubramanian 2020-03-26 18:27 ` Lakshmi Ramasubramanian 2020-03-27 16:37 ` Simran Singhal
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=20200325214312.GA1936@simran-Inspiron-5558 \ --to=singhalsimran0@gmail.com \ --cc=devel@driverdev.osuosl.org \ --cc=gregkh@linuxfoundation.org \ --cc=linux-kernel@vger.kernel.org \ --cc=outreachy-kernel@googlegroups.com \ /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: linkBe 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.