w1: no need to initialise statics to 0
PATCH 1/1 w1: no need to initialise statics to 0
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 <[email protected]>
--- drivers/w1/w1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/w1/w1.c +1 -1
@@ -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" );
Signature · 1 line
2.35.1
Krzysztof Kozlowski
AppliedQuoted 5 lines · 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.
Applied, thanks!
[1/1] w1: no need to initialise statics to 0
https://git.kernel.org/krzk/linux-w1/c/ecaed1a26f7215f48420a9c02e229b84b5fbb882
Best regards,
Signature · 1 line
Krzysztof Kozlowski <[email protected]>