@@ -231,26 +231,26 @@ static inline int get_count_order_long(unsigned long l)
/**
* parity8 - get the parity of an u8 value
- * @value: the value to be examined
+ * @val: the value to be examined
*
* Determine the parity of the u8 argument.
*
* Returns:
- * 0 for even parity, 1 for odd parity
+ * false for even parity, true for odd parity
*
* Note: This function informs you about the current parity. Example to bail
* out when parity is odd:
*
- * if (parity8(val) == 1)
+ * if (parity8(val) == true)
* return -EBADMSG;
*
* If you need to calculate a parity bit, you need to draw the conclusion from
* this result yourself. Example to enforce odd parity, parity bit is bit 7:
*
- * if (parity8(val) == 0)
+ * if (parity8(val) == false)
* val ^= BIT(7);
*/
-static inline int parity8(u8 val)
+static inline __attribute_const__ bool parity8(u8 val)
{
/*
* One explanation of this algorithm: