lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 31 Mar 2022 19:22:43 +0800
From:   Baoquan He <bhe@...hat.com>
To:     Michal Orzel <michalorzel.eng@...il.com>, akpm@...ux-foundation.org
Cc:     Eric Biederman <ebiederm@...ssion.com>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        kexec@...ts.infradead.org, linux-kernel@...r.kernel.org,
        llvm@...ts.linux.dev
Subject: Re: [PATCH] kexec: Remove redundant assignments

On 03/26/22 at 07:09pm, Michal Orzel wrote:
> Get rid of redundant assignments which end up in values not being
> read either because they are overwritten or the function ends.
> 
> Reported by clang-tidy [deadcode.DeadStores]
> 
> Signed-off-by: Michal Orzel <michalorzel.eng@...il.com>
> ---
>  kernel/kexec_core.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c
> index 68480f731192..d08904a27362 100644
> --- a/kernel/kexec_core.c
> +++ b/kernel/kexec_core.c
> @@ -768,7 +768,6 @@ static struct page *kimage_alloc_page(struct kimage *image,
>  				kimage_free_pages(old_page);
>  				continue;
>  			}
> -			addr = old_addr;
>  			page = old_page;
>  			break;
>  		}
> @@ -788,7 +787,6 @@ static int kimage_load_normal_segment(struct kimage *image,
>  	unsigned char __user *buf = NULL;
>  	unsigned char *kbuf = NULL;
>  
> -	result = 0;
>  	if (image->file_mode)
>  		kbuf = segment->kbuf;
>  	else

LGTM, thx

Acked-by: Baoquan He <bhe@...hat.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ