* [Outreachy kernel] [PATCH 0/5] Compress two lines into one line
@ 2019-03-30 14:31 Payal Kshirsagar
2019-03-30 14:31 ` [Outreachy kernel] [PATCH 1/5] staging: rtl8723bs: core: rtw_efuse.c: " Payal Kshirsagar
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Payal Kshirsagar @ 2019-03-30 14:31 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Payal Kshirsagar
Challenge suggested by coccinelle.
This patchset compresses two lines into one line and removes unnecessary variables.
Payal Kshirsagar (5):
staging: rtl8723bs: core: rtw_efuse.c: Compress two lines into one
line
staging: rtl8723bs: core: rtw_cmd.c: Compress two lines into one line
staging: rtl8723bs: hal: hal_com.c: Compress two lines into one line
staging: rtl8723bs: core: rtw_pwrctrl.c: Compress two lines into one
line
staging: rtl8723bs: core: rtw_mlme.c: Compress two lines into one line
drivers/staging/rtl8723bs/core/rtw_cmd.c | 10 ++-------
drivers/staging/rtl8723bs/core/rtw_efuse.c | 33 +++++++++-------------------
drivers/staging/rtl8723bs/core/rtw_mlme.c | 5 +----
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 7 +-----
drivers/staging/rtl8723bs/hal/hal_com.c | 5 +----
5 files changed, 15 insertions(+), 45 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Outreachy kernel] [PATCH 1/5] staging: rtl8723bs: core: rtw_efuse.c: Compress two lines into one line
2019-03-30 14:31 [Outreachy kernel] [PATCH 0/5] Compress two lines into one line Payal Kshirsagar
@ 2019-03-30 14:31 ` Payal Kshirsagar
2019-03-30 14:31 ` [Outreachy kernel] [PATCH 2/5] staging: rtl8723bs: core: rtw_cmd.c: " Payal Kshirsagar
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Payal Kshirsagar @ 2019-03-30 14:31 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Payal Kshirsagar
Challenge suggested by coccinelle.
Return value directly without saving it in a variable and remove that
variable.
Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_efuse.c | 33 +++++++++---------------------
1 file changed, 10 insertions(+), 23 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_efuse.c b/drivers/staging/rtl8723bs/core/rtw_efuse.c
index eea3bec..3b88481 100644
--- a/drivers/staging/rtl8723bs/core/rtw_efuse.c
+++ b/drivers/staging/rtl8723bs/core/rtw_efuse.c
@@ -125,11 +125,8 @@ Efuse_GetCurrentSize(
u8 efuseType,
bool bPseudoTest)
{
- u16 ret = 0;
-
- ret = padapter->HalFunc.EfuseGetCurrentSize(padapter, efuseType, bPseudoTest);
-
- return ret;
+ return padapter->HalFunc.EfuseGetCurrentSize(padapter, efuseType,
+ bPseudoTest);
}
/* 11/16/2008 MH Add description. Get current efuse area enabled word!!. */
@@ -221,7 +218,6 @@ EFUSE_Read1Byte(
struct adapter *Adapter,
u16 Address)
{
- u8 data;
u8 Bytetemp = {0x00};
u8 temp = {0x00};
u32 k = 0;
@@ -253,8 +249,7 @@ u16 Address)
break;
}
}
- data = rtw_read8(Adapter, EFUSE_CTRL);
- return data;
+ return rtw_read8(Adapter, EFUSE_CTRL);
} else
return 0xFF;
@@ -378,11 +373,8 @@ Efuse_PgPacketRead(struct adapter *padapter,
u8 *data,
bool bPseudoTest)
{
- int ret = 0;
-
- ret = padapter->HalFunc.Efuse_PgPacketRead(padapter, offset, data, bPseudoTest);
-
- return ret;
+ return padapter->HalFunc.Efuse_PgPacketRead(padapter, offset, data,
+ bPseudoTest);
}
int
@@ -392,11 +384,8 @@ Efuse_PgPacketWrite(struct adapter *padapter,
u8 *data,
bool bPseudoTest)
{
- int ret;
-
- ret = padapter->HalFunc.Efuse_PgPacketWrite(padapter, offset, word_en, data, bPseudoTest);
-
- return ret;
+ return padapter->HalFunc.Efuse_PgPacketWrite(padapter, offset, word_en,
+ data, bPseudoTest);
}
/*-----------------------------------------------------------------------------
@@ -447,11 +436,9 @@ Efuse_WordEnableDataWrite(struct adapter *padapter,
u8 *data,
bool bPseudoTest)
{
- u8 ret = 0;
-
- ret = padapter->HalFunc.Efuse_WordEnableDataWrite(padapter, efuse_addr, word_en, data, bPseudoTest);
-
- return ret;
+ return padapter->HalFunc.Efuse_WordEnableDataWrite(padapter, efuse_addr,
+ word_en, data,
+ bPseudoTest);
}
/*-----------------------------------------------------------------------------
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Outreachy kernel] [PATCH 2/5] staging: rtl8723bs: core: rtw_cmd.c: Compress two lines into one line
2019-03-30 14:31 [Outreachy kernel] [PATCH 0/5] Compress two lines into one line Payal Kshirsagar
2019-03-30 14:31 ` [Outreachy kernel] [PATCH 1/5] staging: rtl8723bs: core: rtw_efuse.c: " Payal Kshirsagar
@ 2019-03-30 14:31 ` Payal Kshirsagar
2019-03-30 14:31 ` [Outreachy kernel] [PATCH 3/5] staging: rtl8723bs: hal: hal_com.c: " Payal Kshirsagar
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Payal Kshirsagar @ 2019-03-30 14:31 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Payal Kshirsagar
Challenge suggested by coccinelle.
Return value directly without saving it in a variable and remove that
variable.
Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_cmd.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index 91520ca..814a4b7 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -297,18 +297,12 @@ struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue)
u32 rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
{
- u32 res;
-
- res = _rtw_init_cmd_priv(pcmdpriv);
- return res;
+ return _rtw_init_cmd_priv(pcmdpriv);
}
u32 rtw_init_evt_priv(struct evt_priv *pevtpriv)
{
- int res;
-
- res = _rtw_init_evt_priv(pevtpriv);
- return res;
+ return _rtw_init_evt_priv(pevtpriv);
}
void rtw_free_evt_priv(struct evt_priv *pevtpriv)
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Outreachy kernel] [PATCH 3/5] staging: rtl8723bs: hal: hal_com.c: Compress two lines into one line
2019-03-30 14:31 [Outreachy kernel] [PATCH 0/5] Compress two lines into one line Payal Kshirsagar
2019-03-30 14:31 ` [Outreachy kernel] [PATCH 1/5] staging: rtl8723bs: core: rtw_efuse.c: " Payal Kshirsagar
2019-03-30 14:31 ` [Outreachy kernel] [PATCH 2/5] staging: rtl8723bs: core: rtw_cmd.c: " Payal Kshirsagar
@ 2019-03-30 14:31 ` Payal Kshirsagar
2019-03-30 14:31 ` [Outreachy kernel] [PATCH 4/5] staging: rtl8723bs: core: rtw_pwrctrl.c: " Payal Kshirsagar
2019-03-30 14:31 ` [Outreachy kernel] [PATCH 5/5] staging: rtl8723bs: core: rtw_mlme.c: " Payal Kshirsagar
4 siblings, 0 replies; 8+ messages in thread
From: Payal Kshirsagar @ 2019-03-30 14:31 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Payal Kshirsagar
Challenge suggested by coccinelle.
Return value directly without saving it in a variable and remove that
variable.
Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
---
drivers/staging/rtl8723bs/hal/hal_com.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c
index 151e4e9..2c4b8de 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -971,10 +971,7 @@ u8 rtw_hal_networktype_to_raid(struct adapter *adapter, struct sta_info *psta)
u8 rtw_get_mgntframe_raid(struct adapter *adapter, unsigned char network_type)
{
-
- u8 raid;
- raid = (network_type & WIRELESS_11B) ? RATEID_IDX_B : RATEID_IDX_G;
- return raid;
+ return (network_type & WIRELESS_11B) ? RATEID_IDX_B : RATEID_IDX_G;
}
void rtw_hal_update_sta_rate_mask(struct adapter *padapter, struct sta_info *psta)
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Outreachy kernel] [PATCH 4/5] staging: rtl8723bs: core: rtw_pwrctrl.c: Compress two lines into one line
2019-03-30 14:31 [Outreachy kernel] [PATCH 0/5] Compress two lines into one line Payal Kshirsagar
` (2 preceding siblings ...)
2019-03-30 14:31 ` [Outreachy kernel] [PATCH 3/5] staging: rtl8723bs: hal: hal_com.c: " Payal Kshirsagar
@ 2019-03-30 14:31 ` Payal Kshirsagar
2019-03-30 14:31 ` [Outreachy kernel] [PATCH 5/5] staging: rtl8723bs: core: rtw_mlme.c: " Payal Kshirsagar
4 siblings, 0 replies; 8+ messages in thread
From: Payal Kshirsagar @ 2019-03-30 14:31 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Payal Kshirsagar
Challenge suggested by coccinelle.
Return value directly without saving it in a variable and remove that
variable.
Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index 5c468c5..1013af1 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -1400,10 +1400,5 @@ void rtw_ps_deny_cancel(struct adapter *padapter, enum PS_DENY_REASON reason)
*/
u32 rtw_ps_deny_get(struct adapter *padapter)
{
- u32 deny;
-
-
- deny = adapter_to_pwrctl(padapter)->ps_deny;
-
- return deny;
+ return adapter_to_pwrctl(padapter)->ps_deny;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Outreachy kernel] [PATCH 5/5] staging: rtl8723bs: core: rtw_mlme.c: Compress two lines into one line
2019-03-30 14:31 [Outreachy kernel] [PATCH 0/5] Compress two lines into one line Payal Kshirsagar
` (3 preceding siblings ...)
2019-03-30 14:31 ` [Outreachy kernel] [PATCH 4/5] staging: rtl8723bs: core: rtw_pwrctrl.c: " Payal Kshirsagar
@ 2019-03-30 14:31 ` Payal Kshirsagar
2019-03-30 14:44 ` Julia Lawall
4 siblings, 1 reply; 8+ messages in thread
From: Payal Kshirsagar @ 2019-03-30 14:31 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Payal Kshirsagar
Challenge suggested by coccinelle.
Return value directly without saving it in a variable and remove that
variable.
Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_mlme.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 12661d7..ef5f78e 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -353,10 +353,7 @@ u8 *rtw_get_beacon_interval_from_ie(u8 *ie)
int rtw_init_mlme_priv(struct adapter *padapter)/* struct mlme_priv *pmlmepriv) */
{
- int res;
-
- res = _rtw_init_mlme_priv(padapter);/* (pmlmepriv); */
- return res;
+ return _rtw_init_mlme_priv(padapter);
}
void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Outreachy kernel] [PATCH 5/5] staging: rtl8723bs: core: rtw_mlme.c: Compress two lines into one line
2019-03-30 14:31 ` [Outreachy kernel] [PATCH 5/5] staging: rtl8723bs: core: rtw_mlme.c: " Payal Kshirsagar
@ 2019-03-30 14:44 ` Julia Lawall
2019-03-30 14:52 ` Payal Kshirsagar
0 siblings, 1 reply; 8+ messages in thread
From: Julia Lawall @ 2019-03-30 14:44 UTC (permalink / raw)
To: Payal Kshirsagar; +Cc: outreachy-kernel
On Sat, 30 Mar 2019, Payal Kshirsagar wrote:
> Challenge suggested by coccinelle.
> Return value directly without saving it in a variable and remove that
> variable.
>
> Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
> ---
> drivers/staging/rtl8723bs/core/rtw_mlme.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> index 12661d7..ef5f78e 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> @@ -353,10 +353,7 @@ u8 *rtw_get_beacon_interval_from_ie(u8 *ie)
>
> int rtw_init_mlme_priv(struct adapter *padapter)/* struct mlme_priv *pmlmepriv) */
> {
> - int res;
> -
> - res = _rtw_init_mlme_priv(padapter);/* (pmlmepriv); */
> - return res;
> + return _rtw_init_mlme_priv(padapter);
The code doesn't look like this any more. Please update your staging tree
and start over with this patch series.
julia
> }
>
> void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/4756f370659f5e98dcd00f7dea94b062d202235a.1553955183.git.payal.s.kshirsagar.98%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Outreachy kernel] [PATCH 5/5] staging: rtl8723bs: core: rtw_mlme.c: Compress two lines into one line
2019-03-30 14:44 ` Julia Lawall
@ 2019-03-30 14:52 ` Payal Kshirsagar
0 siblings, 0 replies; 8+ messages in thread
From: Payal Kshirsagar @ 2019-03-30 14:52 UTC (permalink / raw)
To: Julia Lawall; +Cc: outreachy-kernel
[-- Attachment #1: Type: text/plain, Size: 1871 bytes --]
On Sat, 30 Mar 2019 at 20:14, Julia Lawall <julia.lawall@lip6.fr> wrote:
>
>
> On Sat, 30 Mar 2019, Payal Kshirsagar wrote:
>
> > Challenge suggested by coccinelle.
> > Return value directly without saving it in a variable and remove that
> > variable.
> >
> > Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
> > ---
> > drivers/staging/rtl8723bs/core/rtw_mlme.c | 5 +----
> > 1 file changed, 1 insertion(+), 4 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c
> b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> > index 12661d7..ef5f78e 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> > @@ -353,10 +353,7 @@ u8 *rtw_get_beacon_interval_from_ie(u8 *ie)
> >
> > int rtw_init_mlme_priv(struct adapter *padapter)/* struct mlme_priv
> *pmlmepriv) */
> > {
> > - int res;
> > -
> > - res = _rtw_init_mlme_priv(padapter);/* (pmlmepriv); */
> > - return res;
> > + return _rtw_init_mlme_priv(padapter);
>
> The code doesn't look like this any more. Please update your staging tree
> and start over with this patch series.
>
Okay I will.
thanks,
payal
> julia
>
>
> > }
> >
> > void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
> > --
> > 2.7.4
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/4756f370659f5e98dcd00f7dea94b062d202235a.1553955183.git.payal.s.kshirsagar.98%40gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
> >
>
[-- Attachment #2: Type: text/html, Size: 3141 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-03-30 14:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-30 14:31 [Outreachy kernel] [PATCH 0/5] Compress two lines into one line Payal Kshirsagar
2019-03-30 14:31 ` [Outreachy kernel] [PATCH 1/5] staging: rtl8723bs: core: rtw_efuse.c: " Payal Kshirsagar
2019-03-30 14:31 ` [Outreachy kernel] [PATCH 2/5] staging: rtl8723bs: core: rtw_cmd.c: " Payal Kshirsagar
2019-03-30 14:31 ` [Outreachy kernel] [PATCH 3/5] staging: rtl8723bs: hal: hal_com.c: " Payal Kshirsagar
2019-03-30 14:31 ` [Outreachy kernel] [PATCH 4/5] staging: rtl8723bs: core: rtw_pwrctrl.c: " Payal Kshirsagar
2019-03-30 14:31 ` [Outreachy kernel] [PATCH 5/5] staging: rtl8723bs: core: rtw_mlme.c: " Payal Kshirsagar
2019-03-30 14:44 ` Julia Lawall
2019-03-30 14:52 ` Payal Kshirsagar
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.