From: Michal Orzel Date: Fri, 29 Apr 2022 21:38:03 +0000 (-0700) Subject: kexec: remove redundant assignments X-Git-Tag: v6.1-rc5~1236^2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=16b0b7adabfb5564a77fa35917afe08decd55b29;p=platform%2Fkernel%2Flinux-starfive.git kexec: remove redundant assignments 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] Link: https://lkml.kernel.org/r/20220326180948.192154-1-michalorzel.eng@gmail.com Signed-off-by: Michal Orzel Acked-by: Baoquan He Cc: Eric Biederman Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Michal Orzel Signed-off-by: Andrew Morton --- 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