lkml.org 
[lkml]   [2022]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@gmail.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@redhat.com>

\
 
 \ /
  Last update: 2022-03-31 13:23    [W:0.028 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site