* [PATCH] staging: rtl8723bs: Remove redundant initialization of variable efuseValue
@ 2022-10-04 15:35 Colin Ian King
2022-10-04 21:12 ` Philipp Hortmann
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-10-04 15:35 UTC (permalink / raw)
To: Greg Kroah-Hartman, Saurav Girepunje, linux-staging
Cc: kernel-janitors, linux-kernel
The variable efuseValue is being initialized with a value that is never
read. The variable is being re-assigned later on. The initialization is
redundant and can be removed.
Cleans up warning:
drivers/staging/rtl8723bs/core/rtw_efuse.c:285:6: warning: variable
'efuseValue' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_efuse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_efuse.c b/drivers/staging/rtl8723bs/core/rtw_efuse.c
index 06e727ce9cc2..eb848f9bbf2c 100644
--- a/drivers/staging/rtl8723bs/core/rtw_efuse.c
+++ b/drivers/staging/rtl8723bs/core/rtw_efuse.c
@@ -282,7 +282,7 @@ u8 efuse_OneByteWrite(struct adapter *padapter, u16 addr, u8 data, bool bPseudoT
{
u8 tmpidx = 0;
u8 bResult = false;
- u32 efuseValue = 0;
+ u32 efuseValue;
if (bPseudoTest)
return Efuse_Write1ByteToFakeContent(addr, data);
--
2.37.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: rtl8723bs: Remove redundant initialization of variable efuseValue
2022-10-04 15:35 [PATCH] staging: rtl8723bs: Remove redundant initialization of variable efuseValue Colin Ian King
@ 2022-10-04 21:12 ` Philipp Hortmann
0 siblings, 0 replies; 2+ messages in thread
From: Philipp Hortmann @ 2022-10-04 21:12 UTC (permalink / raw)
To: Colin Ian King, Greg Kroah-Hartman, Saurav Girepunje, linux-staging
Cc: kernel-janitors, linux-kernel
On 10/4/22 17:35, Colin Ian King wrote:
> The variable efuseValue is being initialized with a value that is never
> read. The variable is being re-assigned later on. The initialization is
> redundant and can be removed.
>
> Cleans up warning:
> drivers/staging/rtl8723bs/core/rtw_efuse.c:285:6: warning: variable
> 'efuseValue' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> drivers/staging/rtl8723bs/core/rtw_efuse.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_efuse.c b/drivers/staging/rtl8723bs/core/rtw_efuse.c
> index 06e727ce9cc2..eb848f9bbf2c 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_efuse.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_efuse.c
> @@ -282,7 +282,7 @@ u8 efuse_OneByteWrite(struct adapter *padapter, u16 addr, u8 data, bool bPseudoT
> {
> u8 tmpidx = 0;
> u8 bResult = false;
> - u32 efuseValue = 0;
> + u32 efuseValue;
>
> if (bPseudoTest)
> return Efuse_Write1ByteToFakeContent(addr, data);
I propose to remove all lines with efuseValue as it is dead code.
Make a v2 of this patch with version history below the ---
Thanks for your support.
Bye Philipp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-04 21:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-04 15:35 [PATCH] staging: rtl8723bs: Remove redundant initialization of variable efuseValue Colin Ian King
2022-10-04 21:12 ` Philipp Hortmann
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).