All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] staging: rtl8723bs: remove unneeded local variables
@ 2020-03-13 15:36 Payal Kshirsagar
  2020-03-13 15:36 ` [PATCH 1/3] staging: rtl8723bs: hal: hal_com.c: remove unneeded variable Payal Kshirsagar
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Payal Kshirsagar @ 2020-03-13 15:36 UTC (permalink / raw)
  To: gregkh, outreachy-kernel; +Cc: Payal Kshirsagar

Remove unneeded variables and their declarations from the files of
staging/rtl8723bs directory.

Payal Kshirsagar (3):
  staging: rtl8723bs: hal: hal_com.c: remove unneeded variable
  staging: rtl8723bs: core: rtw_io.c: remove unneeded variables
  staging: rtl8723bs: core: rtw_pwrctrl.c: remove unneeded variable

 drivers/staging/rtl8723bs/core/rtw_io.c      | 9 ++-------
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 7 +------
 drivers/staging/rtl8723bs/hal/hal_com.c      | 5 +----
 3 files changed, 4 insertions(+), 17 deletions(-)

-- 
2.17.1



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

* [PATCH 1/3] staging: rtl8723bs: hal: hal_com.c: remove unneeded variable
  2020-03-13 15:36 [PATCH 0/3] staging: rtl8723bs: remove unneeded local variables Payal Kshirsagar
@ 2020-03-13 15:36 ` Payal Kshirsagar
  2020-03-13 15:36 ` [PATCH 2/3] staging: rtl8723bs: core: rtw_io.c: remove unneeded variables Payal Kshirsagar
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Payal Kshirsagar @ 2020-03-13 15:36 UTC (permalink / raw)
  To: gregkh, outreachy-kernel; +Cc: Payal Kshirsagar

Remove unneeded local variable, cleanup suggested by coccinelle.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@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 109bd85b0cd8..02676da5c166 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -961,10 +961,7 @@ s32 c2h_evt_read_88xx(struct adapter *adapter, u8 *buf)
 
 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.17.1



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

* [PATCH 2/3] staging: rtl8723bs: core: rtw_io.c: remove unneeded variables
  2020-03-13 15:36 [PATCH 0/3] staging: rtl8723bs: remove unneeded local variables Payal Kshirsagar
  2020-03-13 15:36 ` [PATCH 1/3] staging: rtl8723bs: hal: hal_com.c: remove unneeded variable Payal Kshirsagar
@ 2020-03-13 15:36 ` Payal Kshirsagar
  2020-03-13 15:36 ` [PATCH 3/3] staging: rtl8723bs: core: rtw_pwrctrl.c: remove unneeded variable Payal Kshirsagar
  2020-03-13 19:26 ` [Outreachy kernel] [PATCH 0/3] staging: rtl8723bs: remove unneeded local variables Julia Lawall
  3 siblings, 0 replies; 10+ messages in thread
From: Payal Kshirsagar @ 2020-03-13 15:36 UTC (permalink / raw)
  To: gregkh, outreachy-kernel; +Cc: Payal Kshirsagar

Remove unneeded local variables, cleanup suggested by coccinelle.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_io.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_io.c b/drivers/staging/rtl8723bs/core/rtw_io.c
index 57168578663a..c3f63f903547 100644
--- a/drivers/staging/rtl8723bs/core/rtw_io.c
+++ b/drivers/staging/rtl8723bs/core/rtw_io.c
@@ -37,7 +37,6 @@ jackson@realtek.com.tw
 
 u8 _rtw_read8(struct adapter *adapter, u32 addr)
 {
-	u8 r_val;
 	/* struct	io_queue	*pio_queue = (struct io_queue *)adapter->pio_queue; */
 	struct io_priv *pio_priv = &adapter->iopriv;
 	struct	intf_hdl		*pintfhdl = &(pio_priv->intf);
@@ -45,8 +44,7 @@ u8 _rtw_read8(struct adapter *adapter, u32 addr)
 
 	_read8 = pintfhdl->io_ops._read8;
 
-	r_val = _read8(pintfhdl, addr);
-	return r_val;
+	return _read8(pintfhdl, addr);
 }
 
 u16 _rtw_read16(struct adapter *adapter, u32 addr)
@@ -142,13 +140,10 @@ u32 _rtw_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
 	u32 (*_write_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
 	struct io_priv *pio_priv = &adapter->iopriv;
 	struct	intf_hdl		*pintfhdl = &(pio_priv->intf);
-	u32 ret;
 
 	_write_port = pintfhdl->io_ops._write_port;
 
-	ret = _write_port(pintfhdl, addr, cnt, pmem);
-
-	return ret;
+	return _write_port(pintfhdl, addr, cnt, pmem);
 }
 
 int rtw_init_io_priv(struct adapter *padapter, void (*set_intf_ops)(struct adapter *padapter, struct _io_ops *pops))
-- 
2.17.1



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

* [PATCH 3/3] staging: rtl8723bs: core: rtw_pwrctrl.c: remove unneeded variable
  2020-03-13 15:36 [PATCH 0/3] staging: rtl8723bs: remove unneeded local variables Payal Kshirsagar
  2020-03-13 15:36 ` [PATCH 1/3] staging: rtl8723bs: hal: hal_com.c: remove unneeded variable Payal Kshirsagar
  2020-03-13 15:36 ` [PATCH 2/3] staging: rtl8723bs: core: rtw_io.c: remove unneeded variables Payal Kshirsagar
@ 2020-03-13 15:36 ` Payal Kshirsagar
  2020-03-13 19:26 ` [Outreachy kernel] [PATCH 0/3] staging: rtl8723bs: remove unneeded local variables Julia Lawall
  3 siblings, 0 replies; 10+ messages in thread
From: Payal Kshirsagar @ 2020-03-13 15:36 UTC (permalink / raw)
  To: gregkh, outreachy-kernel; +Cc: Payal Kshirsagar

Remove unneeded local variable and remove blank lines.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@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 30137f0bd984..9ff35a2da024 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -1390,10 +1390,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.17.1



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

* Re: [Outreachy kernel] [PATCH 0/3] staging: rtl8723bs: remove unneeded local variables
  2020-03-13 15:36 [PATCH 0/3] staging: rtl8723bs: remove unneeded local variables Payal Kshirsagar
                   ` (2 preceding siblings ...)
  2020-03-13 15:36 ` [PATCH 3/3] staging: rtl8723bs: core: rtw_pwrctrl.c: remove unneeded variable Payal Kshirsagar
@ 2020-03-13 19:26 ` Julia Lawall
  2020-03-15  5:59   ` Payal Kshirsagar
  3 siblings, 1 reply; 10+ messages in thread
From: Julia Lawall @ 2020-03-13 19:26 UTC (permalink / raw)
  To: Payal Kshirsagar; +Cc: gregkh, outreachy-kernel



On Fri, 13 Mar 2020, Payal Kshirsagar wrote:

> Remove unneeded variables and their declarations from the files of
> staging/rtl8723bs directory.
>
> Payal Kshirsagar (3):
>   staging: rtl8723bs: hal: hal_com.c: remove unneeded variable
>   staging: rtl8723bs: core: rtw_io.c: remove unneeded variables
>   staging: rtl8723bs: core: rtw_pwrctrl.c: remove unneeded variable

The subject lines should be created according to what others have done for
these files.  In any case, there should not be .c

julia

>
>  drivers/staging/rtl8723bs/core/rtw_io.c      | 9 ++-------
>  drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 7 +------
>  drivers/staging/rtl8723bs/hal/hal_com.c      | 5 +----
>  3 files changed, 4 insertions(+), 17 deletions(-)
>
> --
> 2.17.1
>
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1584113084.git.payalskshirsagar1234%40gmail.com.
>


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

* Re: [Outreachy kernel] [PATCH 0/3] staging: rtl8723bs: remove unneeded local variables
  2020-03-13 19:26 ` [Outreachy kernel] [PATCH 0/3] staging: rtl8723bs: remove unneeded local variables Julia Lawall
@ 2020-03-15  5:59   ` Payal Kshirsagar
  2020-03-15  8:40     ` Julia Lawall
  0 siblings, 1 reply; 10+ messages in thread
From: Payal Kshirsagar @ 2020-03-15  5:59 UTC (permalink / raw)
  To: Julia Lawall; +Cc: gregkh, outreachy-kernel

On Fri, 2020-03-13 at 20:26 +0100, Julia Lawall wrote:
> 
> On Fri, 13 Mar 2020, Payal Kshirsagar wrote:
> 
> > Remove unneeded variables and their declarations from the files of
> > staging/rtl8723bs directory.
> > 
> > Payal Kshirsagar (3):
> >   staging: rtl8723bs: hal: hal_com.c: remove unneeded variable
> >   staging: rtl8723bs: core: rtw_io.c: remove unneeded variables
> >   staging: rtl8723bs: core: rtw_pwrctrl.c: remove unneeded variable
> 
> The subject lines should be created according to what others have
> done for
> these files.  In any case, there should not be .c
> 

Since I had done same change in all the files in only a single
directory, I needed to add their names to make the seperate patches for
each file.

> julia
> 
> > 
> >  drivers/staging/rtl8723bs/core/rtw_io.c      | 9 ++-------
> >  drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 7 +------
> >  drivers/staging/rtl8723bs/hal/hal_com.c      | 5 +----
> >  3 files changed, 4 insertions(+), 17 deletions(-)
> > 
> > --
> > 2.17.1
> > 
> > --
> > 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 view this discussion on the web visit 
> > https://groups.google.com/d/msgid/outreachy-kernel/cover.1584113084.git.payalskshirsagar1234%40gmail.com
> > .
> > 



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

* Re: [Outreachy kernel] [PATCH 0/3] staging: rtl8723bs: remove unneeded local variables
  2020-03-15  5:59   ` Payal Kshirsagar
@ 2020-03-15  8:40     ` Julia Lawall
  2020-03-15 10:21       ` Payal Kshirsagar
  0 siblings, 1 reply; 10+ messages in thread
From: Julia Lawall @ 2020-03-15  8:40 UTC (permalink / raw)
  To: Payal Kshirsagar; +Cc: gregkh, outreachy-kernel



On Sun, 15 Mar 2020, Payal Kshirsagar wrote:

> On Fri, 2020-03-13 at 20:26 +0100, Julia Lawall wrote:
> >
> > On Fri, 13 Mar 2020, Payal Kshirsagar wrote:
> >
> > > Remove unneeded variables and their declarations from the files of
> > > staging/rtl8723bs directory.
> > >
> > > Payal Kshirsagar (3):
> > >   staging: rtl8723bs: hal: hal_com.c: remove unneeded variable
> > >   staging: rtl8723bs: core: rtw_io.c: remove unneeded variables
> > >   staging: rtl8723bs: core: rtw_pwrctrl.c: remove unneeded variable
> >
> > The subject lines should be created according to what others have
> > done for
> > these files.  In any case, there should not be .c
> >
>
> Since I had done same change in all the files in only a single
> directory, I needed to add their names to make the seperate patches for
> each file.

Someone suggested that still there should not be the .c part.

julia

>
> > julia
> >
> > >
> > >  drivers/staging/rtl8723bs/core/rtw_io.c      | 9 ++-------
> > >  drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 7 +------
> > >  drivers/staging/rtl8723bs/hal/hal_com.c      | 5 +----
> > >  3 files changed, 4 insertions(+), 17 deletions(-)
> > >
> > > --
> > > 2.17.1
> > >
> > > --
> > > 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 view this discussion on the web visit
> > > https://groups.google.com/d/msgid/outreachy-kernel/cover.1584113084.git.payalskshirsagar1234%40gmail.com
> > > .
> > >
>
>


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

* Re: [Outreachy kernel] [PATCH 0/3] staging: rtl8723bs: remove unneeded local variables
  2020-03-15  8:40     ` Julia Lawall
@ 2020-03-15 10:21       ` Payal Kshirsagar
  2020-03-17 11:38         ` Greg KH
  0 siblings, 1 reply; 10+ messages in thread
From: Payal Kshirsagar @ 2020-03-15 10:21 UTC (permalink / raw)
  To: Julia Lawall; +Cc: gregkh, outreachy-kernel

On Sun, 2020-03-15 at 09:40 +0100, Julia Lawall wrote:
> 
> On Sun, 15 Mar 2020, Payal Kshirsagar wrote:
> 
> > On Fri, 2020-03-13 at 20:26 +0100, Julia Lawall wrote:
> > > 
> > > On Fri, 13 Mar 2020, Payal Kshirsagar wrote:
> > > 
> > > > Remove unneeded variables and their declarations from the files
> > > > of
> > > > staging/rtl8723bs directory.
> > > > 
> > > > Payal Kshirsagar (3):
> > > >   staging: rtl8723bs: hal: hal_com.c: remove unneeded variable
> > > >   staging: rtl8723bs: core: rtw_io.c: remove unneeded variables
> > > >   staging: rtl8723bs: core: rtw_pwrctrl.c: remove unneeded
> > > > variable
> > > 
> > > The subject lines should be created according to what others have
> > > done for
> > > these files.  In any case, there should not be .c
> > > 
> > 
> > Since I had done same change in all the files in only a single
> > directory, I needed to add their names to make the seperate patches
> > for
> > each file.
> 
> Someone suggested that still there should not be the .c part.

Okay, I will make sure from next time:)

> 
> julia
> 
> > 
> > > julia
> > > 
> > > > 
> > > >  drivers/staging/rtl8723bs/core/rtw_io.c      | 9 ++-------
> > > >  drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 7 +------
> > > >  drivers/staging/rtl8723bs/hal/hal_com.c      | 5 +----
> > > >  3 files changed, 4 insertions(+), 17 deletions(-)
> > > > 
> > > > --
> > > > 2.17.1
> > > > 
> > > > --
> > > > 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 view this discussion on the web visit
> > > > 
https://groups.google.com/d/msgid/outreachy-kernel/cover.1584113084.git.payalskshirsagar1234%40gmail.com
> > > > .
> > > > 
> > 
> > 



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

* Re: [Outreachy kernel] [PATCH 0/3] staging: rtl8723bs: remove unneeded local variables
  2020-03-15 10:21       ` Payal Kshirsagar
@ 2020-03-17 11:38         ` Greg KH
  2020-03-21  7:35           ` Payal Kshirsagar
  0 siblings, 1 reply; 10+ messages in thread
From: Greg KH @ 2020-03-17 11:38 UTC (permalink / raw)
  To: Payal Kshirsagar; +Cc: Julia Lawall, outreachy-kernel

On Sun, Mar 15, 2020 at 03:51:24PM +0530, Payal Kshirsagar wrote:
> On Sun, 2020-03-15 at 09:40 +0100, Julia Lawall wrote:
> > 
> > On Sun, 15 Mar 2020, Payal Kshirsagar wrote:
> > 
> > > On Fri, 2020-03-13 at 20:26 +0100, Julia Lawall wrote:
> > > > 
> > > > On Fri, 13 Mar 2020, Payal Kshirsagar wrote:
> > > > 
> > > > > Remove unneeded variables and their declarations from the files
> > > > > of
> > > > > staging/rtl8723bs directory.
> > > > > 
> > > > > Payal Kshirsagar (3):
> > > > >   staging: rtl8723bs: hal: hal_com.c: remove unneeded variable
> > > > >   staging: rtl8723bs: core: rtw_io.c: remove unneeded variables
> > > > >   staging: rtl8723bs: core: rtw_pwrctrl.c: remove unneeded
> > > > > variable
> > > > 
> > > > The subject lines should be created according to what others have
> > > > done for
> > > > these files.  In any case, there should not be .c
> > > > 
> > > 
> > > Since I had done same change in all the files in only a single
> > > directory, I needed to add their names to make the seperate patches
> > > for
> > > each file.
> > 
> > Someone suggested that still there should not be the .c part.
> 
> Okay, I will make sure from next time:)

Please fix this and make sure _this_ time :)


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

* Re: [Outreachy kernel] [PATCH 0/3] staging: rtl8723bs: remove unneeded local variables
  2020-03-17 11:38         ` Greg KH
@ 2020-03-21  7:35           ` Payal Kshirsagar
  0 siblings, 0 replies; 10+ messages in thread
From: Payal Kshirsagar @ 2020-03-21  7:35 UTC (permalink / raw)
  To: Greg KH; +Cc: Julia Lawall, outreachy-kernel

On Tue, 2020-03-17 at 12:38 +0100, Greg KH wrote:
> On Sun, Mar 15, 2020 at 03:51:24PM +0530, Payal Kshirsagar wrote:
> > On Sun, 2020-03-15 at 09:40 +0100, Julia Lawall wrote:
> > > 
> > > On Sun, 15 Mar 2020, Payal Kshirsagar wrote:
> > > 
> > > > On Fri, 2020-03-13 at 20:26 +0100, Julia Lawall wrote:
> > > > > 
> > > > > On Fri, 13 Mar 2020, Payal Kshirsagar wrote:
> > > > > 
> > > > > > Remove unneeded variables and their declarations from the
> > > > > > files
> > > > > > of
> > > > > > staging/rtl8723bs directory.
> > > > > > 
> > > > > > Payal Kshirsagar (3):
> > > > > >   staging: rtl8723bs: hal: hal_com.c: remove unneeded
> > > > > > variable
> > > > > >   staging: rtl8723bs: core: rtw_io.c: remove unneeded
> > > > > > variables
> > > > > >   staging: rtl8723bs: core: rtw_pwrctrl.c: remove unneeded
> > > > > > variable
> > > > > 
> > > > > The subject lines should be created according to what others
> > > > > have
> > > > > done for
> > > > > these files.  In any case, there should not be .c
> > > > > 
> > > > 
> > > > Since I had done same change in all the files in only a single
> > > > directory, I needed to add their names to make the seperate
> > > > patches
> > > > for
> > > > each file.
> > > 
> > > Someone suggested that still there should not be the .c part.
> > 
> > Okay, I will make sure from next time:)
> 
> Please fix this and make sure _this_ time :)

Okay, I will send them all in a single patch so that I won't need to
add .c file names in the subject lines.



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

end of thread, other threads:[~2020-03-21  7:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-13 15:36 [PATCH 0/3] staging: rtl8723bs: remove unneeded local variables Payal Kshirsagar
2020-03-13 15:36 ` [PATCH 1/3] staging: rtl8723bs: hal: hal_com.c: remove unneeded variable Payal Kshirsagar
2020-03-13 15:36 ` [PATCH 2/3] staging: rtl8723bs: core: rtw_io.c: remove unneeded variables Payal Kshirsagar
2020-03-13 15:36 ` [PATCH 3/3] staging: rtl8723bs: core: rtw_pwrctrl.c: remove unneeded variable Payal Kshirsagar
2020-03-13 19:26 ` [Outreachy kernel] [PATCH 0/3] staging: rtl8723bs: remove unneeded local variables Julia Lawall
2020-03-15  5:59   ` Payal Kshirsagar
2020-03-15  8:40     ` Julia Lawall
2020-03-15 10:21       ` Payal Kshirsagar
2020-03-17 11:38         ` Greg KH
2020-03-21  7:35           ` 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.