* [PATCH] w1: no need to initialise statics to 0
@ 2022-05-08 2:34 Jason Wang
2023-05-08 8:59 ` Krzysztof Kozlowski
0 siblings, 1 reply; 2+ messages in thread
From: Jason Wang @ 2022-05-08 2:34 UTC (permalink / raw)
To: zbr; +Cc: linux-kernel, Jason Wang
Static variables do not need to be initialised to 0, because compiler
will initialise all uninitialised statics to 0. Thus, remove the
unneeded initializations.
Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
---
drivers/w1/w1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index f2ae2e563dc5..bb28e36993d6 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -32,7 +32,7 @@ static int w1_timeout = 10;
module_param_named(timeout, w1_timeout, int, 0);
MODULE_PARM_DESC(timeout, "time in seconds between automatic slave searches");
-static int w1_timeout_us = 0;
+static int w1_timeout_us;
module_param_named(timeout_us, w1_timeout_us, int, 0);
MODULE_PARM_DESC(timeout_us,
"time in microseconds between automatic slave searches");
--
2.35.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] w1: no need to initialise statics to 0
2022-05-08 2:34 [PATCH] w1: no need to initialise statics to 0 Jason Wang
@ 2023-05-08 8:59 ` Krzysztof Kozlowski
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-08 8:59 UTC (permalink / raw)
To: zbr, Jason Wang; +Cc: Krzysztof Kozlowski, linux-kernel
On Sun, 08 May 2022 10:34:00 +0800, Jason Wang wrote:
> Static variables do not need to be initialised to 0, because compiler
> will initialise all uninitialised statics to 0. Thus, remove the
> unneeded initializations.
>
>
Applied, thanks!
[1/1] w1: no need to initialise statics to 0
https://git.kernel.org/krzk/linux-w1/c/ecaed1a26f7215f48420a9c02e229b84b5fbb882
Best regards,
--
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-08 9:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-08 2:34 [PATCH] w1: no need to initialise statics to 0 Jason Wang
2023-05-08 8:59 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®