[PATCH v2 1/9] initrd: remove ASCII spinner

Julian Stecklina via B4 Relay posted 9 patches 10 months, 3 weeks ago
[PATCH v2 1/9] initrd: remove ASCII spinner
Posted by Julian Stecklina via B4 Relay 10 months, 3 weeks ago
From: Julian Stecklina <julian.stecklina@cyberus-technology.de>

Writing the ASCII spinner probably costs more cycles than copying the
block of data on some output devices if you output to serial and in
all other cases it rotates at lightspeed in 2025.

Signed-off-by: Julian Stecklina <julian.stecklina@cyberus-technology.de>
---
 init/do_mounts_rd.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index ac021ae6e6fa78c7b7828a78ab2fa3af3611bef3..473f4f9417e157118b9a6e582607435484d53d63 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -189,11 +189,7 @@ int __init rd_load_image(char *from)
 	unsigned long rd_blocks, devblocks;
 	int nblocks, i;
 	char *buf = NULL;
-	unsigned short rotate = 0;
 	decompress_fn decompressor = NULL;
-#if !defined(CONFIG_S390)
-	char rotator[4] = { '|' , '/' , '-' , '\\' };
-#endif
 
 	out_file = filp_open("/dev/ram", O_RDWR, 0);
 	if (IS_ERR(out_file))
@@ -249,18 +245,11 @@ 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;
 		}
 		kernel_read(in_file, buf, BLOCK_SIZE, &in_pos);
 		kernel_write(out_file, buf, BLOCK_SIZE, &out_pos);
-#if !defined(CONFIG_S390)
-		if (!(i % 16)) {
-			pr_cont("%c\b", rotator[rotate & 0x3]);
-			rotate++;
-		}
-#endif
 	}
 	pr_cont("done.\n");
 

-- 
2.47.0
Re: [PATCH v2 1/9] initrd: remove ASCII spinner
Posted by David Disseldorp 10 months, 3 weeks ago
> From: Julian Stecklina <julian.stecklina@cyberus-technology.de>
> 
> Writing the ASCII spinner probably costs more cycles than copying the
> block of data on some output devices if you output to serial and in
> all other cases it rotates at lightspeed in 2025.
> 
> Signed-off-by: Julian Stecklina <julian.stecklina@cyberus-technology.de>
> ---
>  init/do_mounts_rd.c | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
> index ac021ae6e6fa78c7b7828a78ab2fa3af3611bef3..473f4f9417e157118b9a6e582607435484d53d63 100644

Looks good.
Reviewed-by: David Disseldorp <ddiss@suse.de>

Will wait for v3 before looking at the rest of the series.