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

[Minios-devel] [UNIKRAFT PATCH v5 14/15] include/uk: add prefix to hweight* functions



Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx>
Reviewed-by: Florian Schmidt <florian.schmidt@xxxxxxxxx>
---
 include/uk/bitmap.h |  4 ++--
 include/uk/bitops.h | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/uk/bitmap.h b/include/uk/bitmap.h
index 6a2b20f..487ef5f 100644
--- a/include/uk/bitmap.h
+++ b/include/uk/bitmap.h
@@ -213,12 +213,12 @@ uk_bitmap_weight(unsigned long *addr, const unsigned int 
size)
        unsigned int i;
 
        for (i = 0; i != end; i++)
-               retval += hweight_long(addr[i]);
+               retval += uk_hweight_long(addr[i]);
 
        if (tail) {
                const unsigned long mask = UK_BITMAP_LAST_WORD_MASK(tail);
 
-               retval += hweight_long(addr[end] & mask);
+               retval += uk_hweight_long(addr[end] & mask);
        }
        return (retval);
 }
diff --git a/include/uk/bitops.h b/include/uk/bitops.h
index b916c27..fe19f60 100644
--- a/include/uk/bitops.h
+++ b/include/uk/bitops.h
@@ -62,11 +62,11 @@
        (((~0ULL) >> (UK_BITS_PER_LONG_LONG - (h) - 1)) & ((~0ULL) << (l)))
 #define BITS_PER_BYTE  8
 
-#define        hweight8(x)     uk_bitcount((uint8_t)(x))
-#define        hweight16(x)    uk_bitcount16(x)
-#define        hweight32(x)    uk_bitcount32(x)
-#define        hweight64(x)    uk_bitcount64(x)
-#define        hweight_long(x) uk_bitcountl(x)
+#define        uk_hweight8(x)  uk_bitcount((uint8_t)(x))
+#define        uk_hweight16(x) uk_bitcount16(x)
+#define        uk_hweight32(x) uk_bitcount32(x)
+#define        uk_hweight64(x) uk_bitcount64(x)
+#define        uk_hweight_long(x)      uk_bitcountl(x)
 
 #if 0 /* TODO revisit when needed */
 static inline int
-- 
2.18.0


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.