git: 039be66beb86 - stable/13 - bitset: Remove BITSET_FOREACH_ADVANCE

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Fri, 02 Jun 2023 13:17:26 UTC
The branch stable/13 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=039be66beb868c314ef6158c286d63e9a48a8104

commit 039be66beb868c314ef6158c286d63e9a48a8104
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-05-24 17:05:03 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-06-02 13:16:46 +0000

    bitset: Remove BITSET_FOREACH_ADVANCE
    
    __BITSET_FOREACH_ADVANCE is a helper macro for
    __BITSET_FOREACH_IS(SET|CLR) and wasn't meant to be used directly by
    consumers.
    
    While here, fix some whitespace and move a comment back to where it
    belongs.
    
    Fixes:  5e04571cf3cf ("sys/bitset.h: reduce visibility of BIT_* macros")
    MFC after:      1 week
    
    (cherry picked from commit 44866dfb44178c86b6f380eb713a8f07c3d3b566)
---
 sys/sys/bitset.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/sys/sys/bitset.h b/sys/sys/bitset.h
index 4952d48b1b3c..b00f33249cb7 100644
--- a/sys/sys/bitset.h
+++ b/sys/sys/bitset.h
@@ -309,9 +309,6 @@
 #define	__BITSET_SIZE(_s)	(__bitset_words((_s)) * sizeof(long))
 
 #if defined(_KERNEL) || defined(_WANT_FREEBSD_BITSET)
-/*
- * Dynamically allocate a bitset.
- */
 #define	BIT_AND(_s, d, s)			__BIT_AND(_s, d, s)
 #define	BIT_AND2(_s, d, s1, s2)			__BIT_AND2(_s, d, s1, s2)
 #define	BIT_ANDNOT(_s, d, s)			__BIT_ANDNOT(_s, d, s)
@@ -328,8 +325,7 @@
 #define	BIT_FFS_AT(_s, p, start)		__BIT_FFS_AT(_s, p, start)
 #define	BIT_FILL(_s, p)				__BIT_FILL(_s, p)
 #define	BIT_FLS(_s, p)				__BIT_FLS(_s, p)
-#define BIT_FOREACH(_s, i, p, op)		__BIT_FOREACH(_s, i, p, op)
-#define	BIT_FOREACH_ADVANCE(_s, i, p, op)	__BIT_FOREACH_ADVANCE(_s, i, p, op)
+#define	BIT_FOREACH(_s, i, p, op)		__BIT_FOREACH(_s, i, p, op)
 #define	BIT_FOREACH_ISCLR(_s, i, p)		__BIT_FOREACH_ISCLR(_s, i, p)
 #define	BIT_FOREACH_ISSET(_s, i, p)		__BIT_FOREACH_ISSET(_s, i, p)
 #define	BIT_ISFULLSET(_s, p)			__BIT_ISFULLSET(_s, p)
@@ -350,6 +346,9 @@
 #define	BIT_ZERO(_s, p)				__BIT_ZERO(_s, p)
 
 #if defined(_KERNEL)
+/*
+ * Dynamically allocate a bitset.
+ */
 #define BITSET_ALLOC(_s, mt, mf)		malloc(__BITSET_SIZE((_s)), mt, (mf))
 #define	BITSET_FREE(p, mt)			free(p, mt)
 #endif /* _KERNEL */