* [PATCH 0/3] staging: rtl8723bs: fix compiler 'W=1' warnings
@ 2021-04-11 12:57 Fabio Aiuto
2021-04-11 12:57 ` [PATCH 1/3] staging: rtl8723bs: remove unused variable ret in hal/sdio_halinit.c Fabio Aiuto
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Fabio Aiuto @ 2021-04-11 12:57 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel
This patchset fixes some compiler warnings related to unused variables:
1. Removes unused variable after applying of
https://lore.kernel.org/linux-staging/99b111d2bac822b9dc7ff6e1cfd3d3efc62ef836.1618064275.git.fabioaiuto83@gmail.com/
and the issue was reported by kernel test robot:
https://lore.kernel.org/linux-staging/202104110133.bI35NiNS-lkp@intel.com/
2. Fixes two long lines checkpatch issues
3. Removes unused variable
Fabio Aiuto (3):
staging: rtl8723bs: remove unused variable ret in hal/sdio_halinit.c
staging rtl8723bs: split long lines
staging: rtl8723bs: remove unused variable 'start' in
hal/sdio_halinit.c
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] staging: rtl8723bs: remove unused variable ret in hal/sdio_halinit.c
2021-04-11 12:57 [PATCH 0/3] staging: rtl8723bs: fix compiler 'W=1' warnings Fabio Aiuto
@ 2021-04-11 12:57 ` Fabio Aiuto
2021-04-12 9:38 ` Greg KH
2021-04-11 12:57 ` [PATCH 2/3] staging rtl8723bs: split long lines Fabio Aiuto
2021-04-11 12:57 ` [PATCH 3/3] staging: rtl8723bs: remove unused variable 'start' in hal/sdio_halinit.c Fabio Aiuto
2 siblings, 1 reply; 7+ messages in thread
From: Fabio Aiuto @ 2021-04-11 12:57 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, kernel test robot
fix following compiler warning issue:
drivers/staging/rtl8723bs/hal/sdio_halinit.c:
In function 'CardDisableRTL8723BSdio':
>> drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5:
warning: variable 'ret' set but not used [-Wunused-but-set-variable]
881 | u8 ret = _FAIL;
| ^~~
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
---
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index 2098384efe92..936181a73d73 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -878,10 +878,9 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
{
u8 u1bTmp;
u8 bMacPwrCtrlOn;
- u8 ret = _FAIL;
/* Run LPS WL RFOFF flow */
- ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
+ HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
/* ==== Reset digital sequence ====== */
@@ -909,9 +908,8 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
/* ==== Reset digital sequence end ====== */
bMacPwrCtrlOn = false; /* Disable CMD53 R/W */
- ret = false;
rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
- ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
+ HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
}
static u32 rtl8723bs_hal_deinit(struct adapter *padapter)
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] staging rtl8723bs: split long lines
2021-04-11 12:57 [PATCH 0/3] staging: rtl8723bs: fix compiler 'W=1' warnings Fabio Aiuto
2021-04-11 12:57 ` [PATCH 1/3] staging: rtl8723bs: remove unused variable ret in hal/sdio_halinit.c Fabio Aiuto
@ 2021-04-11 12:57 ` Fabio Aiuto
2021-04-12 9:39 ` Greg KH
2021-04-11 12:57 ` [PATCH 3/3] staging: rtl8723bs: remove unused variable 'start' in hal/sdio_halinit.c Fabio Aiuto
2 siblings, 1 reply; 7+ messages in thread
From: Fabio Aiuto @ 2021-04-11 12:57 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel
fix following post-commit hook checkpatch issues:
WARNING: line length of 116 exceeds 100 columns
30: FILE: drivers/staging/rtl8723bs/hal/sdio_halinit.c:883:
+ HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK,
PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
WARNING: line length of 119 exceeds 100 columns
41: FILE: drivers/staging/rtl8723bs/hal/sdio_halinit.c:912:
+ HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK,
PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
---
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index 936181a73d73..552afbaff081 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -880,7 +880,8 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
u8 bMacPwrCtrlOn;
/* Run LPS WL RFOFF flow */
- HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
+ HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK,
+ PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
/* ==== Reset digital sequence ====== */
@@ -909,7 +910,8 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
bMacPwrCtrlOn = false; /* Disable CMD53 R/W */
rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
- HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
+ HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK,
+ PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
}
static u32 rtl8723bs_hal_deinit(struct adapter *padapter)
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] staging: rtl8723bs: remove unused variable 'start' in hal/sdio_halinit.c
2021-04-11 12:57 [PATCH 0/3] staging: rtl8723bs: fix compiler 'W=1' warnings Fabio Aiuto
2021-04-11 12:57 ` [PATCH 1/3] staging: rtl8723bs: remove unused variable ret in hal/sdio_halinit.c Fabio Aiuto
2021-04-11 12:57 ` [PATCH 2/3] staging rtl8723bs: split long lines Fabio Aiuto
@ 2021-04-11 12:57 ` Fabio Aiuto
2 siblings, 0 replies; 7+ messages in thread
From: Fabio Aiuto @ 2021-04-11 12:57 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel
fix following W=1 compiler issue:
drivers/staging/rtl8723bs/hal/sdio_halinit.c:
In function '_ReadAdapterInfo8723BS':
drivers/staging/rtl8723bs/hal/sdio_halinit.c:1156:16:
warning: variable 'start' set but not used [-Wunused-but-set-variable]
1156 | unsigned long start;
| ^~~~~
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
---
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index 552afbaff081..28bb4aaedc5b 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -1153,7 +1153,6 @@ static void _InitOtherVariable(struct adapter *Adapter)
static s32 _ReadAdapterInfo8723BS(struct adapter *padapter)
{
u8 val8;
- unsigned long start;
/* before access eFuse, make sure card enable has been called */
if (!padapter->hw_init_completed)
@@ -1164,9 +1163,6 @@ static s32 _ReadAdapterInfo8723BS(struct adapter *padapter)
val8 |= BIT(6);
rtw_write8(padapter, 0x4e, val8);
-
- start = jiffies;
-
_EfuseCellSel(padapter);
_ReadRFType(padapter);
_ReadPROMContent(padapter);
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] staging: rtl8723bs: remove unused variable ret in hal/sdio_halinit.c
2021-04-11 12:57 ` [PATCH 1/3] staging: rtl8723bs: remove unused variable ret in hal/sdio_halinit.c Fabio Aiuto
@ 2021-04-12 9:38 ` Greg KH
2021-04-12 11:57 ` Fabio Aiuto
0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2021-04-12 9:38 UTC (permalink / raw)
To: Fabio Aiuto; +Cc: linux-staging, linux-kernel, kernel test robot
On Sun, Apr 11, 2021 at 02:57:35PM +0200, Fabio Aiuto wrote:
> fix following compiler warning issue:
>
> drivers/staging/rtl8723bs/hal/sdio_halinit.c:
> In function 'CardDisableRTL8723BSdio':
> >> drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5:
> warning: variable 'ret' set but not used [-Wunused-but-set-variable]
> 881 | u8 ret = _FAIL;
> | ^~~
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
> ---
> drivers/staging/rtl8723bs/hal/sdio_halinit.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> index 2098384efe92..936181a73d73 100644
> --- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> +++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> @@ -878,10 +878,9 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
> {
> u8 u1bTmp;
> u8 bMacPwrCtrlOn;
> - u8 ret = _FAIL;
>
> /* Run LPS WL RFOFF flow */
> - ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
> + HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
>
> /* ==== Reset digital sequence ====== */
>
> @@ -909,9 +908,8 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
> /* ==== Reset digital sequence end ====== */
>
> bMacPwrCtrlOn = false; /* Disable CMD53 R/W */
> - ret = false;
> rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
> - ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
> + HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
> }
Why isn't the return value being checked and returned to the caller if
something goes wrong? Ignoring it feels wrong to me.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] staging rtl8723bs: split long lines
2021-04-11 12:57 ` [PATCH 2/3] staging rtl8723bs: split long lines Fabio Aiuto
@ 2021-04-12 9:39 ` Greg KH
0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2021-04-12 9:39 UTC (permalink / raw)
To: Fabio Aiuto; +Cc: linux-staging, linux-kernel
On Sun, Apr 11, 2021 at 02:57:36PM +0200, Fabio Aiuto wrote:
> fix following post-commit hook checkpatch issues:
>
> WARNING: line length of 116 exceeds 100 columns
> 30: FILE: drivers/staging/rtl8723bs/hal/sdio_halinit.c:883:
> + HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK,
> PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
>
> WARNING: line length of 119 exceeds 100 columns
> 41: FILE: drivers/staging/rtl8723bs/hal/sdio_halinit.c:912:
> + HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK,
> PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
>
> Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
> ---
> drivers/staging/rtl8723bs/hal/sdio_halinit.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
You forgot a ':' in your subject line :(
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] staging: rtl8723bs: remove unused variable ret in hal/sdio_halinit.c
2021-04-12 9:38 ` Greg KH
@ 2021-04-12 11:57 ` Fabio Aiuto
0 siblings, 0 replies; 7+ messages in thread
From: Fabio Aiuto @ 2021-04-12 11:57 UTC (permalink / raw)
To: Greg KH; +Cc: linux-staging, linux-kernel, lkp
On Mon, Apr 12, 2021 at 11:38:48AM +0200, Greg KH wrote:
> On Sun, Apr 11, 2021 at 02:57:35PM +0200, Fabio Aiuto wrote:
> > fix following compiler warning issue:
> >
> > drivers/staging/rtl8723bs/hal/sdio_halinit.c:
> > In function 'CardDisableRTL8723BSdio':
> > >> drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5:
> > warning: variable 'ret' set but not used [-Wunused-but-set-variable]
> > 881 | u8 ret = _FAIL;
> > | ^~~
> >
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
> > ---
> > drivers/staging/rtl8723bs/hal/sdio_halinit.c | 6 ++----
> > 1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> > index 2098384efe92..936181a73d73 100644
> > --- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> > +++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> > @@ -878,10 +878,9 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
> > {
> > u8 u1bTmp;
> > u8 bMacPwrCtrlOn;
> > - u8 ret = _FAIL;
> >
> > /* Run LPS WL RFOFF flow */
> > - ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
> > + HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
> >
> > /* ==== Reset digital sequence ====== */
> >
> > @@ -909,9 +908,8 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
> > /* ==== Reset digital sequence end ====== */
> >
> > bMacPwrCtrlOn = false; /* Disable CMD53 R/W */
> > - ret = false;
> > rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
> > - ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
> > + HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
> > }
>
> Why isn't the return value being checked and returned to the caller if
> something goes wrong? Ignoring it feels wrong to me.
>
> thanks,
>
> greg k-h
ok, I will propagate the return value to the whole caller chain.
CardDisableRTL8723BSdio returns void, will change this to u8...
thank you,
fabio
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-04-12 11:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-11 12:57 [PATCH 0/3] staging: rtl8723bs: fix compiler 'W=1' warnings Fabio Aiuto
2021-04-11 12:57 ` [PATCH 1/3] staging: rtl8723bs: remove unused variable ret in hal/sdio_halinit.c Fabio Aiuto
2021-04-12 9:38 ` Greg KH
2021-04-12 11:57 ` Fabio Aiuto
2021-04-11 12:57 ` [PATCH 2/3] staging rtl8723bs: split long lines Fabio Aiuto
2021-04-12 9:39 ` Greg KH
2021-04-11 12:57 ` [PATCH 3/3] staging: rtl8723bs: remove unused variable 'start' in hal/sdio_halinit.c Fabio Aiuto
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).