2019-06-07 08:25:45

by Nishka Dasgupta

[permalink] [raw]
Subject: [PATCH] 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.

Signed-off-by: Nishka Dasgupta <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 9 ---------
1 file changed, 9 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 65e8cba7feba..5f0b20038a28 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -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;
}

--
2.19.1


2019-06-09 11:04:59

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] staging: rtl8723bs: core: rtw_mlme_ext.c: Remove unused variables

On Fri, Jun 07, 2019 at 12:41:23PM +0530, Nishka Dasgupta wrote:
> Remove variables that are declared and assigned values but not otherwise
> used.
> Issue found with Coccinelle.
>
> Signed-off-by: Nishka Dasgupta <[email protected]>
> ---
> 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

2019-06-10 04:39:03

by Nishka Dasgupta

[permalink] [raw]
Subject: Re: [PATCH] staging: rtl8723bs: core: rtw_mlme_ext.c: Remove unused variables

On 09/06/19 4:32 PM, Greg KH wrote:
> On Fri, Jun 07, 2019 at 12:41:23PM +0530, Nishka Dasgupta wrote:
>> Remove variables that are declared and assigned values but not otherwise
>> used.
>> Issue found with Coccinelle.
>>
>> Signed-off-by: Nishka Dasgupta <[email protected]>
>> ---
>> 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.

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

> thanks,
>
> greg k-h
>

2019-06-10 05:52:00

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] staging: rtl8723bs: core: rtw_mlme_ext.c: Remove unused variables

On Mon, Jun 10, 2019 at 10:08:21AM +0530, Nishka Dasgupta wrote:
> On 09/06/19 4:32 PM, Greg KH wrote:
> > On Fri, Jun 07, 2019 at 12:41:23PM +0530, Nishka Dasgupta wrote:
> > > Remove variables that are declared and assigned values but not otherwise
> > > used.
> > > Issue found with Coccinelle.
> > >
> > > Signed-off-by: Nishka Dasgupta <[email protected]>
> > > ---
> > > 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.
>
> 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

2019-06-10 07:14:47

by Nishka Dasgupta

[permalink] [raw]
Subject: Re: [PATCH] staging: rtl8723bs: core: rtw_mlme_ext.c: Remove unused variables

On 10/06/19 11:19 AM, Greg KH wrote:
> On Mon, Jun 10, 2019 at 10:08:21AM +0530, Nishka Dasgupta wrote:
>> On 09/06/19 4:32 PM, Greg KH wrote:
>>> On Fri, Jun 07, 2019 at 12:41:23PM +0530, Nishka Dasgupta wrote:
>>>> Remove variables that are declared and assigned values but not otherwise
>>>> used.
>>>> Issue found with Coccinelle.
>>>>
>>>> Signed-off-by: Nishka Dasgupta <[email protected]>
>>>> ---
>>>> 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.
>>
>> 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.

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

> 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

> greg k-h
>

2019-06-10 07:25:46

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] staging: rtl8723bs: core: rtw_mlme_ext.c: Remove unused variables

On Mon, Jun 10, 2019 at 12:44:05PM +0530, Nishka Dasgupta wrote:
> On 10/06/19 11:19 AM, Greg KH wrote:
> > On Mon, Jun 10, 2019 at 10:08:21AM +0530, Nishka Dasgupta wrote:
> > > On 09/06/19 4:32 PM, Greg KH wrote:
> > > > On Fri, Jun 07, 2019 at 12:41:23PM +0530, Nishka Dasgupta wrote:
> > > > > Remove variables that are declared and assigned values but not otherwise
> > > > > used.
> > > > > Issue found with Coccinelle.
> > > > >
> > > > > Signed-off-by: Nishka Dasgupta <[email protected]>
> > > > > ---
> > > > > 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.
> > >
> > > 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.
>
> 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).
>
> > 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

2019-06-10 07:33:46

by Nishka Dasgupta

[permalink] [raw]
Subject: Re: [PATCH] staging: rtl8723bs: core: rtw_mlme_ext.c: Remove unused variables

On 10/06/19 12:55 PM, Greg KH wrote:
> On Mon, Jun 10, 2019 at 12:44:05PM +0530, Nishka Dasgupta wrote:
>> On 10/06/19 11:19 AM, Greg KH wrote:
>>> On Mon, Jun 10, 2019 at 10:08:21AM +0530, Nishka Dasgupta wrote:
>>>> On 09/06/19 4:32 PM, Greg KH wrote:
>>>>> On Fri, Jun 07, 2019 at 12:41:23PM +0530, Nishka Dasgupta wrote:
>>>>>> Remove variables that are declared and assigned values but not otherwise
>>>>>> used.
>>>>>> Issue found with Coccinelle.
>>>>>>
>>>>>> Signed-off-by: Nishka Dasgupta <[email protected]>
>>>>>> ---
>>>>>> 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.
>>>>
>>>> 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.
>>
>> 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).
>>
>>> 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,

This helps a lot; thank you!

Nishka

> greg k-h
>