kernel: params: Remove unnecessary ‘0’ values from err
PATCH 1/1 kernel: params: Remove unnecessary ‘0’ values from err
err is assigned first, so it does not need to initialize the assignment.
Signed-off-by Li zeming <[email protected]>
--- kernel/params.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/params.c +1 -1
@@ -331,7 +331,7 @@ EXPORT_SYMBOL(param_ops_bool);int param_set_bool_enable_only (const char *val,const struct kernel_param *kp) { -int err =0 ; +int err;bool new_value;bool orig_value = *(bool *)kp->arg;struct kernel_param dummy_kp = *kp;
Signature · 1 line
2.18.2
Quoted 3 lines · Li zeming
err is assigned first, so it does not need to initialize the assignment.
Signed-off-by Li zeming <[email protected]>
Reviewed-by Randy Dunlap <[email protected]>
Thanks.
Quoted 17 lines
--- kernel/params.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/params.c +1
-1@@ -331,7 +331,7 @@ EXPORT_SYMBOL(param_ops_bool);int param_set_bool_enable_only (const char *val,const struct kernel_param *kp) { -int err =0 ; +int err;bool new_value;bool orig_value = *(bool *)kp->arg;struct kernel_param dummy_kp = *kp;
Signature · 1 line
~Randy
Quoted 8 lines · Randy Dunlap
Quoted 3 lines · Li zeming
err is assigned first, so it does not need to initialize the assignment.
Signed-off-by Li zeming <[email protected]>Reviewed-by Randy Dunlap <[email protected]>
Thanks, I've taken this through the modules tree and pushed out.
Luis