Thread (12 messages) 12 messages, 3 authors, 2021-02-25
STALE1921d

[PATCH 7/8] show_progress: change HASHES_PER_LINE from 65 to 64 to avoid division

From: Ahmad Fatoum <a.fatoum@pengutronix.de>
Date: 2021-02-16 20:02:13
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

Decreasing the progress bar length by one won't change visuals much,
but will allow the compiler to optimize a multiplication and a modulo
into bitwise operations.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 lib/show_progress.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/show_progress.c b/lib/show_progress.c
index 259fb7ab190c..d0d7b31303dc 100644
--- a/lib/show_progress.c
+++ b/lib/show_progress.c
@@ -19,7 +19,7 @@
 #include <progress.h>
 #include <linux/math64.h>
 
-#define HASHES_PER_LINE	65
+#define HASHES_PER_LINE	64
 
 static int printed;
 static int progress_max;
-- 
2.29.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help