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

Re: [Minios-devel] [UNIKRAFT PATCH v4 15/16] include/uk: add prefix to hweight* functions



Reviewed-by: Florian Schmidt <florian.schmidt@xxxxxxxxx>

On 09/06/2018 03:49 PM, Yuri Volchkov wrote:
Signed-off-by: Yuri Volchkov <yuri.volchkov@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 fa0a657..6ed48fd 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


--
Dr. Florian Schmidt
フローリアン・シュミット
Research Scientist,
Systems and Machine Learning Group
NEC Laboratories Europe
Kurfürsten-Anlage 36, D-69115 Heidelberg
Tel.     +49 (0)6221 4342-265
Fax:     +49 (0)6221 4342-155
e-mail:  florian.schmidt@xxxxxxxxx
============================================================
Registered at Amtsgericht Mannheim, Germany, HRB728558

_______________________________________________
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®.