[PATCH] cpumask: Correct cpumask_weight_andnot() doc

From: Christian Loehle
Date: Mon Jul 01 2024 - 04:20:59 EST


The documentation of cpumask_weight_andnot() was the same as
cpumask_weight_and() which is obviously wrong. Document the
actual behavior.

Signed-off-by: Christian Loehle <christian.loehle@xxxxxxx>
---
include/linux/cpumask.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 23686bed441d..325dd80bbc76 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -788,10 +788,10 @@ static inline unsigned int cpumask_weight_and(const struct cpumask *srcp1,

/**
* cpumask_weight_andnot - Count of bits in (*srcp1 & ~*srcp2)
- * @srcp1: the cpumask to count bits (< nr_cpu_ids) in.
- * @srcp2: the cpumask to count bits (< nr_cpu_ids) in.
+ * @srcp1: the cpumask to count set bits (< nr_cpu_ids) in.
+ * @srcp2: the cpumask to count clear bits (< nr_cpu_ids) in.
*
- * Return: count of bits set in both *srcp1 and *srcp2
+ * Return: count of bits set in *srcp1 and clear in *srcp2
*/
static inline unsigned int cpumask_weight_andnot(const struct cpumask *srcp1,
const struct cpumask *srcp2)
--
2.34.1