LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2 0/3] staging: r8188eu: changes to rtl8188e_Add_RateATid
@ 2021-08-16 23:44 Phillip Potter
2021-08-16 23:44 ` [PATCH v2 1/3] staging: r8188eu: remove set but unused variable from rtl8188e_Add_RateATid Phillip Potter
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Phillip Potter @ 2021-08-16 23:44 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, straube.linux, martin, fmdefrancesco,
linux-staging, linux-kernel
This series does some cleanup on the rtl8188e_Add_RateATid function in
hal/rtl8188e_cmd.c:
Removal of a set but unused variable.
Removal of an unneeded DBG_88E call.
Other cleanup (spacing around operators and un-camel-casing a variable).
Revisions of this patch set:
V1: contained everything in one patch.
V2: takes account of feedback from Greg Kroah-Hartman and Fabio M. De
Francesco to split patch up, and more accurately reflect patch
changes in subject lines.
Phillip Potter (3):
staging: r8188eu: remove set but unused variable from
rtl8188e_Add_RateATid
staging: r8188eu: remove unneeded DBG_88E call from
rtl8188e_Add_RateATid
staging: r8188eu: perform cleanup in rtl8188e_Add_RateATid
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 22 +++++++---------------
1 file changed, 7 insertions(+), 15 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/3] staging: r8188eu: remove set but unused variable from rtl8188e_Add_RateATid
2021-08-16 23:44 [PATCH v2 0/3] staging: r8188eu: changes to rtl8188e_Add_RateATid Phillip Potter
@ 2021-08-16 23:44 ` Phillip Potter
2021-08-17 7:01 ` Michael Straube
2021-08-16 23:44 ` [PATCH v2 2/3] staging: r8188eu: remove unneeded DBG_88E call " Phillip Potter
2021-08-16 23:44 ` [PATCH v2 3/3] staging: r8188eu: perform cleanup in rtl8188e_Add_RateATid Phillip Potter
2 siblings, 1 reply; 8+ messages in thread
From: Phillip Potter @ 2021-08-16 23:44 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, straube.linux, martin, fmdefrancesco,
linux-staging, linux-kernel
Remove set but unused variable init_rate from the rtl8188e_Add_RateATid
function in hal/rtl8188eu_cmd.c, as this fixes a kernel test robot
warning. Removing the call to get_highest_rate_idx has no side effects
here so is safe.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
---
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index 6cbda9ab6e3f..4302054c6c83 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -155,7 +155,7 @@ void rtl8188e_Add_RateATid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi
{
struct hal_data_8188e *haldata = GET_HAL_DATA(pAdapter);
- u8 macid, init_rate, raid, shortGIrate = false;
+ u8 macid, raid, shortGIrate = false;
macid = arg&0x1f;
@@ -167,13 +167,8 @@ void rtl8188e_Add_RateATid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi
bitmap |= ((raid<<28)&0xf0000000);
- init_rate = get_highest_rate_idx(bitmap&0x0fffffff)&0x3f;
-
shortGIrate = (arg&BIT(5)) ? true : false;
- if (shortGIrate)
- init_rate |= BIT(6);
-
raid = (bitmap>>28) & 0x0f;
bitmap &= 0x0fffffff;
--
2.31.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 2/3] staging: r8188eu: remove unneeded DBG_88E call from rtl8188e_Add_RateATid
2021-08-16 23:44 [PATCH v2 0/3] staging: r8188eu: changes to rtl8188e_Add_RateATid Phillip Potter
2021-08-16 23:44 ` [PATCH v2 1/3] staging: r8188eu: remove set but unused variable from rtl8188e_Add_RateATid Phillip Potter
@ 2021-08-16 23:44 ` Phillip Potter
2021-08-17 7:02 ` Michael Straube
2021-08-16 23:44 ` [PATCH v2 3/3] staging: r8188eu: perform cleanup in rtl8188e_Add_RateATid Phillip Potter
2 siblings, 1 reply; 8+ messages in thread
From: Phillip Potter @ 2021-08-16 23:44 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, straube.linux, martin, fmdefrancesco,
linux-staging, linux-kernel
Remove unneeded DBG_88E macro call from the rtl8188e_Add_RateATid
function in hal/rtl8188e_cmd.c, as it is not particularly clear in my
opinion, and we should strive towards use of existing kernel machinery
for debugging purposes.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
---
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index 4302054c6c83..77c057e276a5 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -173,9 +173,6 @@ void rtl8188e_Add_RateATid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi
bitmap &= 0x0fffffff;
- DBG_88E("%s=> mac_id:%d, raid:%d, ra_bitmap=0x%x, shortGIrate=0x%02x\n",
- __func__, macid, raid, bitmap, shortGIrate);
-
ODM_RA_UpdateRateInfo_8188E(&haldata->odmpriv, macid, raid, bitmap, shortGIrate);
}
--
2.31.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 3/3] staging: r8188eu: perform cleanup in rtl8188e_Add_RateATid
2021-08-16 23:44 [PATCH v2 0/3] staging: r8188eu: changes to rtl8188e_Add_RateATid Phillip Potter
2021-08-16 23:44 ` [PATCH v2 1/3] staging: r8188eu: remove set but unused variable from rtl8188e_Add_RateATid Phillip Potter
2021-08-16 23:44 ` [PATCH v2 2/3] staging: r8188eu: remove unneeded DBG_88E call " Phillip Potter
@ 2021-08-16 23:44 ` Phillip Potter
2021-08-17 7:05 ` Michael Straube
2 siblings, 1 reply; 8+ messages in thread
From: Phillip Potter @ 2021-08-16 23:44 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, straube.linux, martin, fmdefrancesco,
linux-staging, linux-kernel
Perform some cleanup items in the rtl8188e_Add_RateATid function:
(1) Rename variable shortGIrate to short_gi_rate to comply with kernel
camel case rules.
(2) Introduce additional whitespace around certain operators in the
function, to make it clearer what is happening.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
---
drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
index 77c057e276a5..8d03b24dc5af 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
@@ -155,25 +155,25 @@ void rtl8188e_Add_RateATid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi
{
struct hal_data_8188e *haldata = GET_HAL_DATA(pAdapter);
- u8 macid, raid, shortGIrate = false;
+ u8 macid, raid, short_gi_rate = false;
- macid = arg&0x1f;
+ macid = arg & 0x1f;
- raid = (bitmap>>28) & 0x0f;
+ raid = (bitmap >> 28) & 0x0f;
bitmap &= 0x0fffffff;
if (rssi_level != DM_RATR_STA_INIT)
bitmap = ODM_Get_Rate_Bitmap(&haldata->odmpriv, macid, bitmap, rssi_level);
- bitmap |= ((raid<<28)&0xf0000000);
+ bitmap |= ((raid << 28) & 0xf0000000);
- shortGIrate = (arg&BIT(5)) ? true : false;
+ short_gi_rate = (arg & BIT(5)) ? true : false;
- raid = (bitmap>>28) & 0x0f;
+ raid = (bitmap >> 28) & 0x0f;
bitmap &= 0x0fffffff;
- ODM_RA_UpdateRateInfo_8188E(&haldata->odmpriv, macid, raid, bitmap, shortGIrate);
+ ODM_RA_UpdateRateInfo_8188E(&haldata->odmpriv, macid, raid, bitmap, short_gi_rate);
}
void rtl8188e_set_FwPwrMode_cmd(struct adapter *adapt, u8 Mode)
--
2.31.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/3] staging: r8188eu: remove set but unused variable from rtl8188e_Add_RateATid
2021-08-16 23:44 ` [PATCH v2 1/3] staging: r8188eu: remove set but unused variable from rtl8188e_Add_RateATid Phillip Potter
@ 2021-08-17 7:01 ` Michael Straube
0 siblings, 0 replies; 8+ messages in thread
From: Michael Straube @ 2021-08-17 7:01 UTC (permalink / raw)
To: Phillip Potter, gregkh
Cc: Larry.Finger, martin, fmdefrancesco, linux-staging, linux-kernel
On 8/17/21 1:44 AM, Phillip Potter wrote:
> Remove set but unused variable init_rate from the rtl8188e_Add_RateATid
> function in hal/rtl8188eu_cmd.c, as this fixes a kernel test robot
> warning. Removing the call to get_highest_rate_idx has no side effects
> here so is safe.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
> ---
> drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
> index 6cbda9ab6e3f..4302054c6c83 100644
> --- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
> +++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
> @@ -155,7 +155,7 @@ void rtl8188e_Add_RateATid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi
> {
> struct hal_data_8188e *haldata = GET_HAL_DATA(pAdapter);
>
> - u8 macid, init_rate, raid, shortGIrate = false;
> + u8 macid, raid, shortGIrate = false;
>
> macid = arg&0x1f;
>
> @@ -167,13 +167,8 @@ void rtl8188e_Add_RateATid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi
>
> bitmap |= ((raid<<28)&0xf0000000);
>
> - init_rate = get_highest_rate_idx(bitmap&0x0fffffff)&0x3f;
> -
> shortGIrate = (arg&BIT(5)) ? true : false;
>
> - if (shortGIrate)
> - init_rate |= BIT(6);
> -
> raid = (bitmap>>28) & 0x0f;
>
> bitmap &= 0x0fffffff;
>
Looks good to me.
Acked-by: Michael Straube <straube.linux@gmail.com>
Thanks,
Michael
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/3] staging: r8188eu: remove unneeded DBG_88E call from rtl8188e_Add_RateATid
2021-08-16 23:44 ` [PATCH v2 2/3] staging: r8188eu: remove unneeded DBG_88E call " Phillip Potter
@ 2021-08-17 7:02 ` Michael Straube
0 siblings, 0 replies; 8+ messages in thread
From: Michael Straube @ 2021-08-17 7:02 UTC (permalink / raw)
To: Phillip Potter, gregkh
Cc: Larry.Finger, martin, fmdefrancesco, linux-staging, linux-kernel
On 8/17/21 1:44 AM, Phillip Potter wrote:
> Remove unneeded DBG_88E macro call from the rtl8188e_Add_RateATid
> function in hal/rtl8188e_cmd.c, as it is not particularly clear in my
> opinion, and we should strive towards use of existing kernel machinery
> for debugging purposes.
>
> Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
> ---
> drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
> index 4302054c6c83..77c057e276a5 100644
> --- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
> +++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
> @@ -173,9 +173,6 @@ void rtl8188e_Add_RateATid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi
>
> bitmap &= 0x0fffffff;
>
> - DBG_88E("%s=> mac_id:%d, raid:%d, ra_bitmap=0x%x, shortGIrate=0x%02x\n",
> - __func__, macid, raid, bitmap, shortGIrate);
> -
> ODM_RA_UpdateRateInfo_8188E(&haldata->odmpriv, macid, raid, bitmap, shortGIrate);
> }
>
>
Looks good to me.
Acked-by: Michael Straube <straube.linux@gmail.com>
Thanks,
Michael
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 3/3] staging: r8188eu: perform cleanup in rtl8188e_Add_RateATid
2021-08-16 23:44 ` [PATCH v2 3/3] staging: r8188eu: perform cleanup in rtl8188e_Add_RateATid Phillip Potter
@ 2021-08-17 7:05 ` Michael Straube
2021-08-17 18:02 ` Greg KH
0 siblings, 1 reply; 8+ messages in thread
From: Michael Straube @ 2021-08-17 7:05 UTC (permalink / raw)
To: Phillip Potter, gregkh
Cc: Larry.Finger, martin, fmdefrancesco, linux-staging, linux-kernel
On 8/17/21 1:44 AM, Phillip Potter wrote:
> Perform some cleanup items in the rtl8188e_Add_RateATid function:
> (1) Rename variable shortGIrate to short_gi_rate to comply with kernel
> camel case rules.
> (2) Introduce additional whitespace around certain operators in the
> function, to make it clearer what is happening.
>
> Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
> ---
> drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
> index 77c057e276a5..8d03b24dc5af 100644
> --- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
> +++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
> @@ -155,25 +155,25 @@ void rtl8188e_Add_RateATid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi
> {
> struct hal_data_8188e *haldata = GET_HAL_DATA(pAdapter);
>
> - u8 macid, raid, shortGIrate = false;
> + u8 macid, raid, short_gi_rate = false;
>
> - macid = arg&0x1f;
> + macid = arg & 0x1f;
>
> - raid = (bitmap>>28) & 0x0f;
> + raid = (bitmap >> 28) & 0x0f;
> bitmap &= 0x0fffffff;
>
> if (rssi_level != DM_RATR_STA_INIT)
> bitmap = ODM_Get_Rate_Bitmap(&haldata->odmpriv, macid, bitmap, rssi_level);
>
> - bitmap |= ((raid<<28)&0xf0000000);
> + bitmap |= ((raid << 28) & 0xf0000000);
>
> - shortGIrate = (arg&BIT(5)) ? true : false;
> + short_gi_rate = (arg & BIT(5)) ? true : false;
>
> - raid = (bitmap>>28) & 0x0f;
> + raid = (bitmap >> 28) & 0x0f;
>
> bitmap &= 0x0fffffff;
>
> - ODM_RA_UpdateRateInfo_8188E(&haldata->odmpriv, macid, raid, bitmap, shortGIrate);
> + ODM_RA_UpdateRateInfo_8188E(&haldata->odmpriv, macid, raid, bitmap, short_gi_rate);
> }
>
> void rtl8188e_set_FwPwrMode_cmd(struct adapter *adapt, u8 Mode)
>
Perhaps the added spaces around operators could conflict with
pending patch sets that address spacing style issues, otherwise...
Acked-by: Michael Straube <straube.linux@gmail.com>
Thanks,
Michael
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 3/3] staging: r8188eu: perform cleanup in rtl8188e_Add_RateATid
2021-08-17 7:05 ` Michael Straube
@ 2021-08-17 18:02 ` Greg KH
0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2021-08-17 18:02 UTC (permalink / raw)
To: Michael Straube
Cc: Phillip Potter, Larry.Finger, martin, fmdefrancesco,
linux-staging, linux-kernel
On Tue, Aug 17, 2021 at 09:05:43AM +0200, Michael Straube wrote:
> On 8/17/21 1:44 AM, Phillip Potter wrote:
> > Perform some cleanup items in the rtl8188e_Add_RateATid function:
> > (1) Rename variable shortGIrate to short_gi_rate to comply with kernel
> > camel case rules.
> > (2) Introduce additional whitespace around certain operators in the
> > function, to make it clearer what is happening.
> >
> > Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
> > ---
> > drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 14 +++++++-------
> > 1 file changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
> > index 77c057e276a5..8d03b24dc5af 100644
> > --- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
> > +++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c
> > @@ -155,25 +155,25 @@ void rtl8188e_Add_RateATid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi
> > {
> > struct hal_data_8188e *haldata = GET_HAL_DATA(pAdapter);
> > - u8 macid, raid, shortGIrate = false;
> > + u8 macid, raid, short_gi_rate = false;
> > - macid = arg&0x1f;
> > + macid = arg & 0x1f;
> > - raid = (bitmap>>28) & 0x0f;
> > + raid = (bitmap >> 28) & 0x0f;
> > bitmap &= 0x0fffffff;
> > if (rssi_level != DM_RATR_STA_INIT)
> > bitmap = ODM_Get_Rate_Bitmap(&haldata->odmpriv, macid, bitmap, rssi_level);
> > - bitmap |= ((raid<<28)&0xf0000000);
> > + bitmap |= ((raid << 28) & 0xf0000000);
> > - shortGIrate = (arg&BIT(5)) ? true : false;
> > + short_gi_rate = (arg & BIT(5)) ? true : false;
> > - raid = (bitmap>>28) & 0x0f;
> > + raid = (bitmap >> 28) & 0x0f;
> > bitmap &= 0x0fffffff;
> > - ODM_RA_UpdateRateInfo_8188E(&haldata->odmpriv, macid, raid, bitmap, shortGIrate);
> > + ODM_RA_UpdateRateInfo_8188E(&haldata->odmpriv, macid, raid, bitmap, short_gi_rate);
> > }
> > void rtl8188e_set_FwPwrMode_cmd(struct adapter *adapt, u8 Mode)
> >
>
> Perhaps the added spaces around operators could conflict with
> pending patch sets that address spacing style issues, otherwise...
Yeah, it conflicted too much, so I couldn't apply this one.
Phillip, can you rebase and resend this one patch, your first 2 worked
just fine and are now in my tree.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-08-17 18:02 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16 23:44 [PATCH v2 0/3] staging: r8188eu: changes to rtl8188e_Add_RateATid Phillip Potter
2021-08-16 23:44 ` [PATCH v2 1/3] staging: r8188eu: remove set but unused variable from rtl8188e_Add_RateATid Phillip Potter
2021-08-17 7:01 ` Michael Straube
2021-08-16 23:44 ` [PATCH v2 2/3] staging: r8188eu: remove unneeded DBG_88E call " Phillip Potter
2021-08-17 7:02 ` Michael Straube
2021-08-16 23:44 ` [PATCH v2 3/3] staging: r8188eu: perform cleanup in rtl8188e_Add_RateATid Phillip Potter
2021-08-17 7:05 ` Michael Straube
2021-08-17 18:02 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).