Module Name:    src
Committed By:   riastradh
Date:           Mon Aug 27 13:54:37 UTC 2018

Modified Files:
        src/sys/external/bsd/common/include/linux: bitops.h

Log Message:
Move hweight8 next to its cousins.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/common/include/linux/bitops.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/common/include/linux/bitops.h
diff -u src/sys/external/bsd/common/include/linux/bitops.h:1.6 src/sys/external/bsd/common/include/linux/bitops.h:1.7
--- src/sys/external/bsd/common/include/linux/bitops.h:1.6	Mon Aug 27 07:16:50 2018
+++ src/sys/external/bsd/common/include/linux/bitops.h	Mon Aug 27 13:54:37 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: bitops.h,v 1.6 2018/08/27 07:16:50 riastradh Exp $	*/
+/*	$NetBSD: bitops.h,v 1.7 2018/08/27 13:54:37 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -73,6 +73,12 @@ fls(int x)
 }
 
 static inline unsigned int
+hweight8(uint8_t w)
+{
+	return popcount(w & 0xff);
+}
+
+static inline unsigned int
 hweight16(uint16_t n)
 {
 	return popcount32(n);
@@ -257,11 +263,4 @@ find_first_zero_bit(const unsigned long 
 	     (BIT) < (NBITS);						      \
 	     (BIT) = find_next_bit((PTR), (NBITS), (BIT) + 1))
 
-static inline unsigned
-hweight8(unsigned w)
-{
-
-	return popcount(w & 0xff);
-}
-
 #endif  /* _LINUX_BITOPS_H_ */

Reply via email to