Skip to contentSkip to conversation

staging: rtl8723bs: remove unneeded local variables

PATCH In review Payal Kshirsagar 3 participants 10 messages Mar 13, 2020 – Mar 21, 2020 Staging

lore
Share & tools
lore
#0 lore raw

cover staging: rtl8723bs: remove unneeded local variables

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(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/3 staging: rtl8723bs: hal: hal_com.c: remove unneeded variable

Remove unneeded local variable, cleanup suggested by coccinelle.

---
 drivers/staging/rtl8723bs/hal/hal_com.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/staging/rtl8723bs/hal/hal_com.c +1 -4
index 109bd85b0cd8..02676da5c166 100644
@@ -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)
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/3 staging: rtl8723bs: core: rtw_io.c: remove unneeded variables

In reply to Payal Kshirsagar

Remove unneeded local variables, cleanup suggested by coccinelle.

---
 drivers/staging/rtl8723bs/core/rtw_io.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/staging/rtl8723bs/core/rtw_io.c +2 -7
index 57168578663a..c3f63f903547 100644
@@ -37,7 +37,6 @@ [email protected]
 
 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))
Signature · 1 line
2.17.1
#3 lore raw

PATCH 3/3 staging: rtl8723bs: core: rtw_pwrctrl.c: remove unneeded variable

In reply to Payal Kshirsagar

Remove unneeded local variable and remove blank lines.

---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +1 -6
index 30137f0bd984..9ff35a2da024 100644
@@ -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;
 }
Signature · 1 line
2.17.1
#4 lore raw
In reply to Payal Kshirsagar
Quoted 7 lines · 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

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

julia

Quoted 14 lines
 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1584113084.git.payalskshirsagar1234%40gmail.com.

#5 lore raw
Quoted 6 lines · Julia Lawall
Quoted 3 lines · Payal Kshirsagar

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

Quoted 9 lines
Quoted 4 lines

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.

Quoted 20 lines

julia

Quoted 18 lines
 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 [email protected]. To view this discussion on the web visit
https://groups.google.com/d/msgid/outreachy-kernel/cover.1584113084.git.payalskshirsagar1234%40gmail.com
.

#6 lore raw
Quoted 12 lines · Payal Kshirsagar
Quoted 11 lines · Julia Lawall
Quoted 7 lines · 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

Quoted 8 lines
Quoted 4 lines

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

Quoted 23 lines
Quoted 21 lines

julia

Quoted 18 lines
 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 [email protected]. To view this discussion on the web visit
https://groups.google.com/d/msgid/outreachy-kernel/cover.1584113084.git.payalskshirsagar1234%40gmail.com
.

#7 lore raw
Quoted 22 lines · Julia Lawall
Quoted 19 lines · Payal Kshirsagar
Quoted 17 lines · Julia Lawall
Quoted 9 lines · 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

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

Quoted 6 lines
Quoted 4 lines

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:)

Quoted 24 lines

julia

Quoted 21 lines
Quoted 21 lines

julia

Quoted 18 lines
 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 [email protected]. To view this discussion on the web visit

https://groups.google.com/d/msgid/outreachy-kernel/cover.1584113084.git.payalskshirsagar1234%40gmail.com

Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines

.

maintainer
#8 lore raw
Quoted 23 lines · Payal Kshirsagar
Quoted 22 lines · Julia Lawall
Quoted 19 lines · Payal Kshirsagar
Quoted 17 lines · Julia Lawall
Quoted 9 lines · 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

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

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

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 :)

#9 lore raw
Quoted 34 lines · Greg KH
Quoted 33 lines · Payal Kshirsagar
Quoted 32 lines · Julia Lawall
Quoted 28 lines · Payal Kshirsagar
Quoted 16 lines · Julia Lawall
Quoted 5 lines · Payal Kshirsagar

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

Quoted 7 lines

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

Quoted 5 lines

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.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

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.