mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
aae06fc1b5
lib/bitmap.c and corresponding include/linux/bitmap.h are intended to hold functions related to operations on bitmaps, like bitmap_shift or bitmap_set. Historically, some string-related operations like bitmap_parse are also reside in lib/bitmap.c. Now that the subsystem evolves, string-related bitmap operations became a significant part of the file. Because they are quite different from the other bitmap functions by nature, it's worth to split them to a separate source/header files. CC: Andrew Morton <akpm@linux-foundation.org> CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com> CC: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Yury Norov <yury.norov@gmail.com>
17 lines
842 B
C
17 lines
842 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __LINUX_BITMAP_STR_H
|
|
#define __LINUX_BITMAP_STR_H
|
|
|
|
int bitmap_parse_user(const char __user *ubuf, unsigned int ulen, unsigned long *dst, int nbits);
|
|
int bitmap_print_to_pagebuf(bool list, char *buf, const unsigned long *maskp, int nmaskbits);
|
|
extern int bitmap_print_bitmask_to_buf(char *buf, const unsigned long *maskp,
|
|
int nmaskbits, loff_t off, size_t count);
|
|
extern int bitmap_print_list_to_buf(char *buf, const unsigned long *maskp,
|
|
int nmaskbits, loff_t off, size_t count);
|
|
int bitmap_parse(const char *buf, unsigned int buflen, unsigned long *dst, int nbits);
|
|
int bitmap_parselist(const char *buf, unsigned long *maskp, int nmaskbits);
|
|
int bitmap_parselist_user(const char __user *ubuf, unsigned int ulen,
|
|
unsigned long *dst, int nbits);
|
|
|
|
#endif /* __LINUX_BITMAP_STR_H */
|