[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1408364e-6b73-7b50-e61c-470f3548a3a7@infradead.org>
Date: Sun, 9 Jul 2023 20:33:28 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: Li zeming <zeming@...china.com>, mcgrof@...nel.org,
linux@...musvillemoes.dk, mbenes@...e.cz, rafael@...nel.org,
linux@...ssschuh.net, gregkh@...uxfoundation.org,
christophe.jaillet@...adoo.fr
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kernel: params: Remove unnecessary ‘0’ values from err
On 7/11/23 12:43, Li zeming wrote:
> err is assigned first, so it does not need to initialize the assignment.
>
> Signed-off-by: Li zeming <zeming@...china.com>
Reviewed-by: Randy Dunlap <rdunlap@...radead.org>
Thanks.
> ---
> kernel/params.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/params.c b/kernel/params.c
> index 6a7548979aa9..f8837a5f2c3e 100644
> --- a/kernel/params.c
> +++ b/kernel/params.c
> @@ -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;
--
~Randy
Powered by blists - more mailing lists