Skip to contentSkip to conversation

initrd: remove redundant assignment to variable rotate

PATCH New Colin King 1 participant 1 message Apr 29, 2021

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 initrd: remove redundant assignment to variable rotate

From: Colin Ian King <[email protected]>

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;
                        ^        ~
---
 init/do_mounts_rd.c | 1 -
 1 file changed, 1 deletion(-)
init/do_mounts_rd.c +0 -1
index ac021ae6e6fa..8003604dbf90 100644
@@ -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;
 		}
Signature · 1 line
2.30.2