* [PATCH -next] staging: rtl8712: drop pointless static qualifier in r8712_efuse_pg_packet_write()
@ 2019-01-21 7:53 YueHaibing
2019-01-21 17:56 ` Larry Finger
0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-01-21 7:53 UTC (permalink / raw)
To: Larry Finger, Florian Schilhabel, Greg Kroah-Hartman, Michael Straube
Cc: YueHaibing, devel, linux-kernel, kernel-janitors
There is no need to have the 'intrepeat_times' variable static since new
value always be assigned before use it.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/staging/rtl8712/rtl8712_efuse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8712/rtl8712_efuse.c b/drivers/staging/rtl8712/rtl8712_efuse.c
index 8bc45ff..39eb743 100644
--- a/drivers/staging/rtl8712/rtl8712_efuse.c
+++ b/drivers/staging/rtl8712/rtl8712_efuse.c
@@ -358,7 +358,7 @@ u8 r8712_efuse_pg_packet_write(struct _adapter *padapter, const u8 offset,
u8 pg_header = 0;
u16 efuse_addr = 0, curr_size = 0;
u8 efuse_data, target_word_cnts = 0;
- static int repeat_times;
+ int repeat_times;
int sub_repeat;
u8 bResult = true;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] staging: rtl8712: drop pointless static qualifier in r8712_efuse_pg_packet_write()
2019-01-21 7:53 [PATCH -next] staging: rtl8712: drop pointless static qualifier in r8712_efuse_pg_packet_write() YueHaibing
@ 2019-01-21 17:56 ` Larry Finger
0 siblings, 0 replies; 2+ messages in thread
From: Larry Finger @ 2019-01-21 17:56 UTC (permalink / raw)
To: YueHaibing, Florian Schilhabel, Greg Kroah-Hartman, Michael Straube
Cc: devel, linux-kernel, kernel-janitors
On 1/21/19 1:53 AM, YueHaibing wrote:
> There is no need to have the 'intrepeat_times' variable static since new
> value always be assigned before use it.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/staging/rtl8712/rtl8712_efuse.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8712/rtl8712_efuse.c b/drivers/staging/rtl8712/rtl8712_efuse.c
> index 8bc45ff..39eb743 100644
> --- a/drivers/staging/rtl8712/rtl8712_efuse.c
> +++ b/drivers/staging/rtl8712/rtl8712_efuse.c
> @@ -358,7 +358,7 @@ u8 r8712_efuse_pg_packet_write(struct _adapter *padapter, const u8 offset,
> u8 pg_header = 0;
> u16 efuse_addr = 0, curr_size = 0;
> u8 efuse_data, target_word_cnts = 0;
> - static int repeat_times;
> + int repeat_times;
> int sub_repeat;
> u8 bResult = true;
Clearly, the value of this variable is not intended to be carried over between
calls to this routine. Your fix is correct.
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Thanks,
Larry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-21 17:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-21 7:53 [PATCH -next] staging: rtl8712: drop pointless static qualifier in r8712_efuse_pg_packet_write() YueHaibing
2019-01-21 17:56 ` Larry Finger
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).