[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZS5ek5RrW3XaBph9@FVFF77S0Q05N>
Date: Tue, 17 Oct 2023 11:14:43 +0100
From: Mark Rutland <mark.rutland@....com>
To: Li zeming <zeming@...china.com>
Cc: gor@...ux.ibm.com, hca@...ux.ibm.com, linux-kernel@...r.kernel.org,
Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] stackleak: Remove unnecessary '0' values from ret
On Tue, Oct 17, 2023 at 02:08:24PM +0800, Li zeming wrote:
> ret is assigned first, so it does not need to initialize the assignment.
>
> Signed-off-by: Li zeming <zeming@...china.com>
Does this actually need to change? It's not harmful, and deleting the
assignment doesn't save any lines of code.
That said, I don't have strong feelings either way, and Kees is the
de-facto-yet-undocumented maintainer for this code, so I will leave it to him
to decide whether to apply.
Mark.
> ---
> kernel/stackleak.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/stackleak.c b/kernel/stackleak.c
> index 34c9d81eea940..3faf863593846 100644
> --- a/kernel/stackleak.c
> +++ b/kernel/stackleak.c
> @@ -24,7 +24,7 @@ static DEFINE_STATIC_KEY_FALSE(stack_erasing_bypass);
> static int stack_erasing_sysctl(struct ctl_table *table, int write,
> void __user *buffer, size_t *lenp, loff_t *ppos)
> {
> - int ret = 0;
> + int ret;
> int state = !static_branch_unlikely(&stack_erasing_bypass);
> int prev_state = state;
>
> --
> 2.18.2
>
Powered by blists - more mailing lists