• Home
  • Raw
  • Download

Lines Matching refs:buf

376 int __bitmap_parse(const char *buf, unsigned int buflen,  in __bitmap_parse()  argument
382 const char __user __force *ubuf = (const char __user __force *)buf; in __bitmap_parse()
399 c = *buf++; in __bitmap_parse()
490 int bitmap_print_to_pagebuf(bool list, char *buf, const unsigned long *maskp, in bitmap_print_to_pagebuf() argument
493 ptrdiff_t len = PAGE_SIZE - offset_in_page(buf); in bitmap_print_to_pagebuf()
495 return list ? scnprintf(buf, len, "%*pbl\n", nmaskbits, maskp) : in bitmap_print_to_pagebuf()
496 scnprintf(buf, len, "%*pb\n", nmaskbits, maskp); in bitmap_print_to_pagebuf()
642 int bitmap_parselist(const char *buf, unsigned long *maskp, int nmaskbits) in bitmap_parselist() argument
649 while (buf) { in bitmap_parselist()
650 buf = bitmap_find_region(buf); in bitmap_parselist()
651 if (buf == NULL) in bitmap_parselist()
654 buf = bitmap_parse_region(buf, &r); in bitmap_parselist()
655 if (IS_ERR(buf)) in bitmap_parselist()
656 return PTR_ERR(buf); in bitmap_parselist()
687 char *buf; in bitmap_parselist_user() local
690 buf = memdup_user_nul(ubuf, ulen); in bitmap_parselist_user()
691 if (IS_ERR(buf)) in bitmap_parselist_user()
692 return PTR_ERR(buf); in bitmap_parselist_user()
694 ret = bitmap_parselist(buf, maskp, nmaskbits); in bitmap_parselist_user()
696 kfree(buf); in bitmap_parselist_user()
721 static int bitmap_pos_to_ord(const unsigned long *buf, unsigned int pos, unsigned int nbits) in bitmap_pos_to_ord() argument
723 if (pos >= nbits || !test_bit(pos, buf)) in bitmap_pos_to_ord()
726 return __bitmap_weight(buf, pos); in bitmap_pos_to_ord()
747 unsigned int bitmap_ord_to_pos(const unsigned long *buf, unsigned int ord, unsigned int nbits) in bitmap_ord_to_pos() argument
751 for (pos = find_first_bit(buf, nbits); in bitmap_ord_to_pos()
753 pos = find_next_bit(buf, nbits, pos + 1)) in bitmap_ord_to_pos()
1197 void bitmap_from_arr32(unsigned long *bitmap, const u32 *buf, unsigned int nbits) in bitmap_from_arr32() argument
1203 bitmap[i/2] = (unsigned long) buf[i]; in bitmap_from_arr32()
1205 bitmap[i/2] |= ((unsigned long) buf[i]) << 32; in bitmap_from_arr32()
1220 void bitmap_to_arr32(u32 *buf, const unsigned long *bitmap, unsigned int nbits) in bitmap_to_arr32() argument
1226 buf[i] = (u32) (bitmap[i/2] & UINT_MAX); in bitmap_to_arr32()
1228 buf[i] = (u32) (bitmap[i/2] >> 32); in bitmap_to_arr32()
1233 buf[halfwords - 1] &= (u32) (UINT_MAX >> ((-nbits) & 31)); in bitmap_to_arr32()