Lines Matching refs:ord
634 * gets mapped to (returns) @ord value 3 in this example, that means
641 int i, ord;
647 ord = 0;
650 ord++;
654 return ord;
660 * @ord: ordinal bit position (n-th set bit, n >= 0)
663 * Map the ordinal offset of bit @ord in @buf to its position in @buf.
664 * Value of @ord should be in range 0 <= @ord < weight(buf), else
667 * If for example, just bits 4 through 7 are set in @buf, then @ord
669 * and all other @ord values return undefined values. When @ord value 3
675 static int bitmap_ord_to_pos(const unsigned long *buf, int ord, int bits)
679 if (ord >= 0 && ord < bits) {
683 i < bits && ord > 0;
685 ord--;
686 if (i < bits && ord == 0)