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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux