All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] initrd: remove redundant assignment to variable rotate
@ 2021-04-29 10:03 Colin King
  0 siblings, 0 replies; only message in thread
From: Colin King @ 2021-04-29 10:03 UTC (permalink / raw)
  To: Nathan Chancellor, Nick Desaulniers, linux-kernel
  Cc: kernel-janitors, clang-built-linux

From: Colin Ian King <colin.king@canonical.com>

The assignment of 0 to rotate is redundant, the value is never
read so it can be it removed.

Cleans up clang scan-build warning:
init/do_mounts_rd.c:252:4: warning: Value stored to 'rotate' is
never read [deadcode.DeadStores]
                        rotate = 0;
                        ^        ~
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 init/do_mounts_rd.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index ac021ae6e6fa..8003604dbf90 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -249,7 +249,6 @@ int __init rd_load_image(char *from)
 	for (i = 0; i < nblocks; i++) {
 		if (i && (i % devblocks == 0)) {
 			pr_cont("done disk #1.\n");
-			rotate = 0;
 			fput(in_file);
 			break;
 		}
-- 
2.30.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-29 10:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29 10:03 [PATCH] initrd: remove redundant assignment to variable rotate Colin King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.