* [PATCH] staging: r8188eu: remove label at the end of a function
@ 2021-08-05 13:07 Martin Kaiser
2021-08-05 14:37 ` Dan Carpenter
2021-08-05 14:50 ` [PATCH v2] " Martin Kaiser
0 siblings, 2 replies; 6+ messages in thread
From: Martin Kaiser @ 2021-08-05 13:07 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Larry Finger, Phillip Potter, Dan Carpenter, linux-staging,
linux-kernel, Martin Kaiser
Compilation fails for me
drivers/staging/r8188eu/hal/rtl8188e_dm.c: In function ‘rtl8188e_HalDmWatchDog’:
drivers/staging/r8188eu/hal/rtl8188e_dm.c:182:1: error: label at end of compound statement
182 | skip_dm:
| ^~~~~~~
Remove the label at the end of the function. Replace the jump to this label
with a return statement.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/hal/rtl8188e_dm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_dm.c b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
index b5f42127a751..72b3130eddd2 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_dm.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
@@ -145,7 +145,7 @@ void rtl8188e_HalDmWatchDog(struct adapter *Adapter)
hw_init_completed = Adapter->hw_init_completed;
if (!hw_init_completed)
- goto skip_dm;
+ return;
fw_cur_in_ps = Adapter->pwrctrlpriv.bFwCurrentInPSMode;
rtw_hal_get_hwreg(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&fw_ps_awake));
@@ -179,7 +179,7 @@ void rtl8188e_HalDmWatchDog(struct adapter *Adapter)
ODM_CmnInfoUpdate(&hal_data->odmpriv, ODM_CMNINFO_LINK, bLinked);
ODM_DMWatchdog(&hal_data->odmpriv);
}
-skip_dm:
+
/* Check GPIO to determine current RF on/off and Pbc status. */
/* Check Hardware Radio ON/OFF or not */
}
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: r8188eu: remove label at the end of a function
2021-08-05 13:07 [PATCH] staging: r8188eu: remove label at the end of a function Martin Kaiser
@ 2021-08-05 14:37 ` Dan Carpenter
2021-08-05 14:50 ` [PATCH v2] " Martin Kaiser
1 sibling, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2021-08-05 14:37 UTC (permalink / raw)
To: Martin Kaiser
Cc: Greg Kroah-Hartman, Larry Finger, Phillip Potter, linux-staging,
linux-kernel
On Thu, Aug 05, 2021 at 03:07:50PM +0200, Martin Kaiser wrote:
> Compilation fails for me
>
> drivers/staging/r8188eu/hal/rtl8188e_dm.c: In function ‘rtl8188e_HalDmWatchDog’:
> drivers/staging/r8188eu/hal/rtl8188e_dm.c:182:1: error: label at end of compound statement
> 182 | skip_dm:
> | ^~~~~~~
>
> Remove the label at the end of the function. Replace the jump to this label
> with a return statement.
>
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
This needs a Fixes tag.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] staging: r8188eu: remove label at the end of a function
2021-08-05 13:07 [PATCH] staging: r8188eu: remove label at the end of a function Martin Kaiser
2021-08-05 14:37 ` Dan Carpenter
@ 2021-08-05 14:50 ` Martin Kaiser
2021-08-05 17:55 ` Greg Kroah-Hartman
2021-08-05 18:29 ` Greg Kroah-Hartman
1 sibling, 2 replies; 6+ messages in thread
From: Martin Kaiser @ 2021-08-05 14:50 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Larry Finger, Phillip Potter, Dan Carpenter, linux-staging,
linux-kernel, Martin Kaiser
Compilation fails for me
drivers/staging/r8188eu/hal/rtl8188e_dm.c: In function ‘rtl8188e_HalDmWatchDog’:
drivers/staging/r8188eu/hal/rtl8188e_dm.c:182:1: error: label at end of compound statement
182 | skip_dm:
| ^~~~~~~
Remove the label at the end of the function. Replace the jump to this label
with a return statement.
Fixes: b398ff88aa36 ("staging: r8188eu: remove return from void functions")
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
v2:
- add Fixes tag
drivers/staging/r8188eu/hal/rtl8188e_dm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_dm.c b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
index b5f42127a751..72b3130eddd2 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_dm.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
@@ -145,7 +145,7 @@ void rtl8188e_HalDmWatchDog(struct adapter *Adapter)
hw_init_completed = Adapter->hw_init_completed;
if (!hw_init_completed)
- goto skip_dm;
+ return;
fw_cur_in_ps = Adapter->pwrctrlpriv.bFwCurrentInPSMode;
rtw_hal_get_hwreg(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&fw_ps_awake));
@@ -179,7 +179,7 @@ void rtl8188e_HalDmWatchDog(struct adapter *Adapter)
ODM_CmnInfoUpdate(&hal_data->odmpriv, ODM_CMNINFO_LINK, bLinked);
ODM_DMWatchdog(&hal_data->odmpriv);
}
-skip_dm:
+
/* Check GPIO to determine current RF on/off and Pbc status. */
/* Check Hardware Radio ON/OFF or not */
}
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] staging: r8188eu: remove label at the end of a function
2021-08-05 14:50 ` [PATCH v2] " Martin Kaiser
@ 2021-08-05 17:55 ` Greg Kroah-Hartman
2021-08-05 18:27 ` Greg Kroah-Hartman
2021-08-05 18:29 ` Greg Kroah-Hartman
1 sibling, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2021-08-05 17:55 UTC (permalink / raw)
To: Martin Kaiser
Cc: Larry Finger, Phillip Potter, Dan Carpenter, linux-staging, linux-kernel
On Thu, Aug 05, 2021 at 04:50:26PM +0200, Martin Kaiser wrote:
> Compilation fails for me
>
> drivers/staging/r8188eu/hal/rtl8188e_dm.c: In function ‘rtl8188e_HalDmWatchDog’:
> drivers/staging/r8188eu/hal/rtl8188e_dm.c:182:1: error: label at end of compound statement
> 182 | skip_dm:
> | ^~~~~~~
>
> Remove the label at the end of the function. Replace the jump to this label
> with a return statement.
>
> Fixes: b398ff88aa36 ("staging: r8188eu: remove return from void functions")
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> ---
> v2:
> - add Fixes tag
>
> drivers/staging/r8188eu/hal/rtl8188e_dm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/hal/rtl8188e_dm.c b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
> index b5f42127a751..72b3130eddd2 100644
> --- a/drivers/staging/r8188eu/hal/rtl8188e_dm.c
> +++ b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
> @@ -145,7 +145,7 @@ void rtl8188e_HalDmWatchDog(struct adapter *Adapter)
> hw_init_completed = Adapter->hw_init_completed;
>
> if (!hw_init_completed)
> - goto skip_dm;
> + return;
>
> fw_cur_in_ps = Adapter->pwrctrlpriv.bFwCurrentInPSMode;
> rtw_hal_get_hwreg(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&fw_ps_awake));
> @@ -179,7 +179,7 @@ void rtl8188e_HalDmWatchDog(struct adapter *Adapter)
> ODM_CmnInfoUpdate(&hal_data->odmpriv, ODM_CMNINFO_LINK, bLinked);
> ODM_DMWatchdog(&hal_data->odmpriv);
> }
> -skip_dm:
> +
> /* Check GPIO to determine current RF on/off and Pbc status. */
> /* Check Hardware Radio ON/OFF or not */
> }
> --
> 2.20.1
>
>
How is this not showing up in my build tests? Odd, let me figure that
out...
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] staging: r8188eu: remove label at the end of a function
2021-08-05 17:55 ` Greg Kroah-Hartman
@ 2021-08-05 18:27 ` Greg Kroah-Hartman
0 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2021-08-05 18:27 UTC (permalink / raw)
To: Martin Kaiser
Cc: Larry Finger, Phillip Potter, Dan Carpenter, linux-staging, linux-kernel
On Thu, Aug 05, 2021 at 07:55:16PM +0200, Greg Kroah-Hartman wrote:
> On Thu, Aug 05, 2021 at 04:50:26PM +0200, Martin Kaiser wrote:
> > Compilation fails for me
> >
> > drivers/staging/r8188eu/hal/rtl8188e_dm.c: In function ‘rtl8188e_HalDmWatchDog’:
> > drivers/staging/r8188eu/hal/rtl8188e_dm.c:182:1: error: label at end of compound statement
> > 182 | skip_dm:
> > | ^~~~~~~
> >
> > Remove the label at the end of the function. Replace the jump to this label
> > with a return statement.
> >
> > Fixes: b398ff88aa36 ("staging: r8188eu: remove return from void functions")
> > Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> > ---
> > v2:
> > - add Fixes tag
> >
> > drivers/staging/r8188eu/hal/rtl8188e_dm.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/r8188eu/hal/rtl8188e_dm.c b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
> > index b5f42127a751..72b3130eddd2 100644
> > --- a/drivers/staging/r8188eu/hal/rtl8188e_dm.c
> > +++ b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
> > @@ -145,7 +145,7 @@ void rtl8188e_HalDmWatchDog(struct adapter *Adapter)
> > hw_init_completed = Adapter->hw_init_completed;
> >
> > if (!hw_init_completed)
> > - goto skip_dm;
> > + return;
> >
> > fw_cur_in_ps = Adapter->pwrctrlpriv.bFwCurrentInPSMode;
> > rtw_hal_get_hwreg(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&fw_ps_awake));
> > @@ -179,7 +179,7 @@ void rtl8188e_HalDmWatchDog(struct adapter *Adapter)
> > ODM_CmnInfoUpdate(&hal_data->odmpriv, ODM_CMNINFO_LINK, bLinked);
> > ODM_DMWatchdog(&hal_data->odmpriv);
> > }
> > -skip_dm:
> > +
> > /* Check GPIO to determine current RF on/off and Pbc status. */
> > /* Check Hardware Radio ON/OFF or not */
> > }
> > --
> > 2.20.1
> >
> >
>
> How is this not showing up in my build tests? Odd, let me figure that
> out...
odd, I think this is a gcc bug, the code above here is correct. But
I'll take the fix for it...
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] staging: r8188eu: remove label at the end of a function
2021-08-05 14:50 ` [PATCH v2] " Martin Kaiser
2021-08-05 17:55 ` Greg Kroah-Hartman
@ 2021-08-05 18:29 ` Greg Kroah-Hartman
1 sibling, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2021-08-05 18:29 UTC (permalink / raw)
To: Martin Kaiser
Cc: Larry Finger, Phillip Potter, Dan Carpenter, linux-staging, linux-kernel
On Thu, Aug 05, 2021 at 04:50:26PM +0200, Martin Kaiser wrote:
> Compilation fails for me
>
> drivers/staging/r8188eu/hal/rtl8188e_dm.c: In function ‘rtl8188e_HalDmWatchDog’:
> drivers/staging/r8188eu/hal/rtl8188e_dm.c:182:1: error: label at end of compound statement
> 182 | skip_dm:
> | ^~~~~~~
>
> Remove the label at the end of the function. Replace the jump to this label
> with a return statement.
>
> Fixes: b398ff88aa36 ("staging: r8188eu: remove return from void functions")
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> ---
> v2:
> - add Fixes tag
>
> drivers/staging/r8188eu/hal/rtl8188e_dm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/hal/rtl8188e_dm.c b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
> index b5f42127a751..72b3130eddd2 100644
> --- a/drivers/staging/r8188eu/hal/rtl8188e_dm.c
> +++ b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
> @@ -145,7 +145,7 @@ void rtl8188e_HalDmWatchDog(struct adapter *Adapter)
> hw_init_completed = Adapter->hw_init_completed;
>
> if (!hw_init_completed)
> - goto skip_dm;
> + return;
>
> fw_cur_in_ps = Adapter->pwrctrlpriv.bFwCurrentInPSMode;
> rtw_hal_get_hwreg(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&fw_ps_awake));
> @@ -179,7 +179,7 @@ void rtl8188e_HalDmWatchDog(struct adapter *Adapter)
> ODM_CmnInfoUpdate(&hal_data->odmpriv, ODM_CMNINFO_LINK, bLinked);
> ODM_DMWatchdog(&hal_data->odmpriv);
> }
> -skip_dm:
> +
> /* Check GPIO to determine current RF on/off and Pbc status. */
> /* Check Hardware Radio ON/OFF or not */
> }
> --
> 2.20.1
https://lore.kernel.org/r/20210805140941.9130-1-straube.linux@gmail.com
just submitted the same thing right before you, I'll go add both
signed-off-by as you both did the same thing...
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-08-05 18:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05 13:07 [PATCH] staging: r8188eu: remove label at the end of a function Martin Kaiser
2021-08-05 14:37 ` Dan Carpenter
2021-08-05 14:50 ` [PATCH v2] " Martin Kaiser
2021-08-05 17:55 ` Greg Kroah-Hartman
2021-08-05 18:27 ` Greg Kroah-Hartman
2021-08-05 18:29 ` Greg Kroah-Hartman
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).