Skip to contentSkip to conversation

staging: rtl8723bs: core: rtw_mlme_ext.c: Remove unused variables

PATCH In review Nishka Dasgupta 2 participants 7 messages Jun 7, 2019 – Jun 10, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8723bs: core: rtw_mlme_ext.c: Remove unused variables

Remove variables that are declared and assigned values but not otherwise used.
Issue found with Coccinelle.

---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0 -9
index 65e8cba7feba..5f0b20038a28 100644
@@ -6771,10 +6771,6 @@ int rtw_get_ch_setting_union(struct adapter *adapter, u8 *ch, u8 *bw, u8 *offset
 {
 	struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
 	struct adapter *iface;
-	struct mlme_ext_priv *mlmeext;
-	u8 ch_ret = 0;
-	u8 bw_ret = CHANNEL_WIDTH_20;
-	u8 offset_ret = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
 
 	if (ch)
 		*ch = 0;
@@ -6784,15 +6780,10 @@ int rtw_get_ch_setting_union(struct adapter *adapter, u8 *ch, u8 *bw, u8 *offset
 		*offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
 
 	iface = dvobj->padapters;
-	mlmeext = &iface->mlmeextpriv;
 
 	if (!check_fwstate(&iface->mlmepriv, _FW_LINKED|_FW_UNDER_LINKING))
 		return 0;
 
-	ch_ret = mlmeext->cur_channel;
-	bw_ret = mlmeext->cur_bwmode;
-	offset_ret = mlmeext->cur_ch_offset;
-
 	return 1;
 }
 
Signature · 1 line
2.19.1
maintainer
#1 lore raw
Quoted 8 lines · Nishka Dasgupta

Remove variables that are declared and assigned values but not otherwise used.
Issue found with Coccinelle.

---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 9 ---------
 1 file changed, 9 deletions(-)

You sent me 8 patches for this driver, yet only 2 were ordered in a series. I have no idea what order to apply these in :(

Please resend them _all_ in a numbered patch series so I have a chance to get this correct.

thanks,

greg k-h

#2 lore raw
Quoted 10 lines · Greg KH
Quoted 8 lines · Nishka Dasgupta

Remove variables that are declared and assigned values but not otherwise used.
Issue found with Coccinelle.

---
  drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 9 ---------
  1 file changed, 9 deletions(-)
Quoted 5 lines

You sent me 8 patches for this driver, yet only 2 were ordered in a series. I have no idea what order to apply these in :(

Please resend them _all_ in a numbered patch series so I have a chance to get this correct.

Yes, I can do that. Who do I send the patch series to in that case? The maintainers list is slightly different for each file, and most of the patches in this driver are for different and unrelated files (except, I think, the two that I did send as a patch series). Do I combine the maintainers lists and send the entire patch series to everyone listed as a maintainer for any one of the patches in it?

Thanking you,
Nishka

Quoted 4 lines

thanks,

greg k-h

maintainer
#3 lore raw
Quoted 17 lines · Nishka Dasgupta
Quoted 10 lines · Greg KH
Quoted 8 lines · Nishka Dasgupta

Remove variables that are declared and assigned values but not otherwise used.
Issue found with Coccinelle.

---
  drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 9 ---------
  1 file changed, 9 deletions(-)
Quoted 5 lines

You sent me 8 patches for this driver, yet only 2 were ordered in a series. I have no idea what order to apply these in :(

Please resend them _all_ in a numbered patch series so I have a chance to get this correct.

Quoted 6 lines

Yes, I can do that. Who do I send the patch series to in that case? The maintainers list is slightly different for each file, and most of the patches in this driver are for different and unrelated files (except, I think, the two that I did send as a patch series). Do I combine the maintainers lists and send the entire patch series to everyone listed as a maintainer for any one of the patches in it?

The maintainer and mailing list is the same for all of the files in a single driver. If not, then something is wrong.

And yes, you can combine the list of people if you wish but be sure you are not just randomly including people who happened to touch the driver "last".

greg k-h

#4 lore raw
Quoted 25 lines · Greg KH
Quoted 17 lines · Nishka Dasgupta
Quoted 10 lines · Greg KH
Quoted 8 lines · Nishka Dasgupta

Remove variables that are declared and assigned values but not otherwise used.
Issue found with Coccinelle.

---
   drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 9 ---------
   1 file changed, 9 deletions(-)
Quoted 5 lines

You sent me 8 patches for this driver, yet only 2 were ordered in a series. I have no idea what order to apply these in :(

Please resend them _all_ in a numbered patch series so I have a chance to get this correct.

Quoted 6 lines

Yes, I can do that. Who do I send the patch series to in that case? The maintainers list is slightly different for each file, and most of the patches in this driver are for different and unrelated files (except, I think, the two that I did send as a patch series). Do I combine the maintainers lists and send the entire patch series to everyone listed as a maintainer for any one of the patches in it?

Quoted 2 lines

The maintainer and mailing list is the same for all of the files in a single driver. If not, then something is wrong.

I'm using get_maintainers.pl with no arguments, and for rtl8723bs, I am getting a lot of different mailing lists. E.g
For core/rtw_ieee80211.c, I'm getting the following list:
Greg Kroah-Hartman <[email protected]>
Michael Straube <[email protected]>
Andy Shevchenko <[email protected]>
Hardik Singh Rathore <[email protected]>
Payal Kshirsagar <[email protected]>
Nishka Dasgupta <[email protected]>
[email protected] (open list:STAGING SUBSYSTEM)
[email protected] (open list)

Which is not the same as for core/rtw_mlme_ext.c (the current patch).

Quoted 3 lines

And yes, you can combine the list of people if you wish but be sure you are not just randomly including people who happened to touch the driver "last".

Okay, I'll combine then. But is there any metric I should be using to filter the output of get_maintainer.pl? Currently I'm running it with no arguments and just adding everyone.

Thanking you,
Nishka

Quoted 2 lines

greg k-h

maintainer
#5 lore raw
Quoted 44 lines · Nishka Dasgupta
Quoted 25 lines · Greg KH
Quoted 17 lines · Nishka Dasgupta
Quoted 10 lines · Greg KH
Quoted 8 lines · Nishka Dasgupta

Remove variables that are declared and assigned values but not otherwise used.
Issue found with Coccinelle.

---
   drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 9 ---------
   1 file changed, 9 deletions(-)
Quoted 5 lines

You sent me 8 patches for this driver, yet only 2 were ordered in a series. I have no idea what order to apply these in :(

Please resend them _all_ in a numbered patch series so I have a chance to get this correct.

Quoted 6 lines

Yes, I can do that. Who do I send the patch series to in that case? The maintainers list is slightly different for each file, and most of the patches in this driver are for different and unrelated files (except, I think, the two that I did send as a patch series). Do I combine the maintainers lists and send the entire patch series to everyone listed as a maintainer for any one of the patches in it?

Quoted 2 lines

The maintainer and mailing list is the same for all of the files in a single driver. If not, then something is wrong.

I'm using get_maintainers.pl with no arguments, and for rtl8723bs, I am getting a lot of different mailing lists.
E.g
For core/rtw_ieee80211.c, I'm getting the following list:
Greg Kroah-Hartman <[email protected]>
Michael Straube <[email protected]>
Andy Shevchenko <[email protected]>
Hardik Singh Rathore <[email protected]>
Payal Kshirsagar <[email protected]>
Nishka Dasgupta <[email protected]> [email protected] (open list:STAGING SUBSYSTEM) [email protected] (open list)

Which is not the same as for core/rtw_mlme_ext.c (the current patch).

Quoted 7 lines
Quoted 3 lines

And yes, you can combine the list of people if you wish but be sure you are not just randomly including people who happened to touch the driver "last".

Okay, I'll combine then. But is there any metric I should be using to filter the output of get_maintainer.pl? Currently I'm running it with no arguments and just adding everyone.

Look at the "role" that each person has. Here is the output of get_maintainer.pl when I run it on the first file above:

$ ./scripts/get_maintainer.pl --file drivers/staging/rtl8723bs/core/rtw_ieee80211.c
Greg Kroah-Hartman <[email protected]> (supporter:STAGING SUBSYSTEM,commit_signer:16/16=100%)
Michael Straube <[email protected]> (commit_signer:14/16=88%,authored:14/16=88%,added_lines:43/59=73%,removed_lines:114/130=88%)
Payal Kshirsagar <[email protected]> (commit_signer:1/16=6%,authored:1/16=6%,added_lines:3/59=5%)
Hardik Singh Rathore <[email protected]> (commit_signer:1/16=6%,authored:1/16=6%,added_lines:13/59=22%,removed_lines:13/130=10%)
Andy Shevchenko <[email protected]> (commit_signer:1/16=6%)
[email protected] (open list:STAGING SUBSYSTEM)
[email protected] (open list)

That shows that "Greg Kroah-Hartman" is a reviewer for this subsystem, Michael and Payal and Hardik and Andy have all submitted patches "recently", and then devel@ is the mailing list for the patches to be sent to.

So, just include the maintainer and the mailing list and you will be fine. No need to bother lkml with staging patches, nor the people who last sent cleanup patches.

hope this helps,

greg k-h

#6 lore raw
Quoted 71 lines · Greg KH
Quoted 44 lines · Nishka Dasgupta
Quoted 25 lines · Greg KH
Quoted 17 lines · Nishka Dasgupta
Quoted 10 lines · Greg KH
Quoted 8 lines · Nishka Dasgupta

Remove variables that are declared and assigned values but not otherwise used.
Issue found with Coccinelle.

---
    drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 9 ---------
    1 file changed, 9 deletions(-)
Quoted 5 lines

You sent me 8 patches for this driver, yet only 2 were ordered in a series. I have no idea what order to apply these in :(

Please resend them _all_ in a numbered patch series so I have a chance to get this correct.

Quoted 6 lines

Yes, I can do that. Who do I send the patch series to in that case? The maintainers list is slightly different for each file, and most of the patches in this driver are for different and unrelated files (except, I think, the two that I did send as a patch series). Do I combine the maintainers lists and send the entire patch series to everyone listed as a maintainer for any one of the patches in it?

Quoted 2 lines

The maintainer and mailing list is the same for all of the files in a single driver. If not, then something is wrong.

I'm using get_maintainers.pl with no arguments, and for rtl8723bs, I am getting a lot of different mailing lists.
E.g
For core/rtw_ieee80211.c, I'm getting the following list:
Greg Kroah-Hartman <[email protected]>
Michael Straube <[email protected]>
Andy Shevchenko <[email protected]>
Hardik Singh Rathore <[email protected]>
Payal Kshirsagar <[email protected]>
Nishka Dasgupta <[email protected]> [email protected] (open list:STAGING SUBSYSTEM) [email protected] (open list)

Which is not the same as for core/rtw_mlme_ext.c (the current patch).

Quoted 7 lines
Quoted 3 lines

And yes, you can combine the list of people if you wish but be sure you are not just randomly including people who happened to touch the driver "last".

Okay, I'll combine then. But is there any metric I should be using to filter the output of get_maintainer.pl? Currently I'm running it with no arguments and just adding everyone.

Look at the "role" that each person has. Here is the output of get_maintainer.pl when I run it on the first file above:

$ ./scripts/get_maintainer.pl --file drivers/staging/rtl8723bs/core/rtw_ieee80211.c
Greg Kroah-Hartman <[email protected]> (supporter:STAGING SUBSYSTEM,commit_signer:16/16=100%)
Michael Straube <[email protected]> (commit_signer:14/16=88%,authored:14/16=88%,added_lines:43/59=73%,removed_lines:114/130=88%)
Payal Kshirsagar <[email protected]> (commit_signer:1/16=6%,authored:1/16=6%,added_lines:3/59=5%)
Hardik Singh Rathore <[email protected]> (commit_signer:1/16=6%,authored:1/16=6%,added_lines:13/59=22%,removed_lines:13/130=10%)
Andy Shevchenko <[email protected]> (commit_signer:1/16=6%)
[email protected] (open list:STAGING SUBSYSTEM)
[email protected] (open list)

That shows that "Greg Kroah-Hartman" is a reviewer for this subsystem, Michael and Payal and Hardik and Andy have all submitted patches "recently", and then devel@ is the mailing list for the patches to be sent to.

Quoted 5 lines

So, just include the maintainer and the mailing list and you will be fine. No need to bother lkml with staging patches, nor the people who last sent cleanup patches.

hope this helps,

This helps a lot; thank you!

Nishka

Quoted 2 lines

greg k-h