All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix __clzsi2 logic
@ 2022-09-29 22:00 Tuan Phan
  2022-10-03 15:26 ` Daniel Kiper
  0 siblings, 1 reply; 7+ messages in thread
From: Tuan Phan @ 2022-09-29 22:00 UTC (permalink / raw)
  Cc: grub-devel, Tuan Phan

Fix the incorrect return value of __clzsi2 function.

Fixes: e795b90 ("RISC-V: Add libgcc helpers for clz")
Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
---
 grub-core/kern/compiler-rt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grub-core/kern/compiler-rt.c b/grub-core/kern/compiler-rt.c
index 2057c2e0c..55ae9f97e 100644
--- a/grub-core/kern/compiler-rt.c
+++ b/grub-core/kern/compiler-rt.c
@@ -431,7 +431,7 @@ __clzsi2 (grub_uint32_t val)
 
   for (; j; j >>= 1)
     {
-      if ((temp = val) >> j)
+      if ((temp = (val >> j)))
         {
           if (j == 1)
             {
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-10-10 21:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-29 22:00 [PATCH] Fix __clzsi2 logic Tuan Phan
2022-10-03 15:26 ` Daniel Kiper
2022-10-03 18:06   ` Tuan Phan
2022-10-03 18:29   ` [PATCH v2] " Tuan Phan
2022-10-10 16:43     ` Tuan Phan
2022-10-10 20:29       ` Daniel Kiper
2022-10-10 21:44         ` Tuan Phan

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.