You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
bitmap, cpumask, nodemask: remove dedicated formatting functions
Now that all bitmap formatting usages have been converted to '%*pb[l]', the separate formatting functions are unnecessary. The following functions are removed. * bitmap_scn[list]printf() * cpumask_scnprintf(), cpulist_scnprintf() * [__]nodemask_scnprintf(), [__]nodelist_scnprintf() * seq_bitmap[_list](), seq_cpumask[_list](), seq_nodemask[_list]() * seq_buf_bitmask() Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
ccbd59c1c1
commit
46385326cc
@@ -369,24 +369,6 @@ EXPORT_SYMBOL(bitmap_find_next_zero_area_off);
|
||||
#define nbits_to_hold_value(val) fls(val)
|
||||
#define BASEDEC 10 /* fancier cpuset lists input in decimal */
|
||||
|
||||
/**
|
||||
* bitmap_scnprintf - convert bitmap to an ASCII hex string.
|
||||
* @buf: byte buffer into which string is placed
|
||||
* @buflen: reserved size of @buf, in bytes
|
||||
* @maskp: pointer to bitmap to convert
|
||||
* @nmaskbits: size of bitmap, in bits
|
||||
*
|
||||
* Exactly @nmaskbits bits are displayed. Hex digits are grouped into
|
||||
* comma-separated sets of eight digits per set. Returns the number of
|
||||
* characters which were written to *buf, excluding the trailing \0.
|
||||
*/
|
||||
int bitmap_scnprintf(char *buf, unsigned int buflen,
|
||||
const unsigned long *maskp, int nmaskbits)
|
||||
{
|
||||
return scnprintf(buf, buflen, "%*pb", nmaskbits, maskp);
|
||||
}
|
||||
EXPORT_SYMBOL(bitmap_scnprintf);
|
||||
|
||||
/**
|
||||
* __bitmap_parse - convert an ASCII hex string into a bitmap.
|
||||
* @buf: pointer to buffer containing string.
|
||||
@@ -500,29 +482,6 @@ int bitmap_parse_user(const char __user *ubuf,
|
||||
}
|
||||
EXPORT_SYMBOL(bitmap_parse_user);
|
||||
|
||||
/**
|
||||
* bitmap_scnlistprintf - convert bitmap to list format ASCII string
|
||||
* @buf: byte buffer into which string is placed
|
||||
* @buflen: reserved size of @buf, in bytes
|
||||
* @maskp: pointer to bitmap to convert
|
||||
* @nmaskbits: size of bitmap, in bits
|
||||
*
|
||||
* Output format is a comma-separated list of decimal numbers and
|
||||
* ranges. Consecutively set bits are shown as two hyphen-separated
|
||||
* decimal numbers, the smallest and largest bit numbers set in
|
||||
* the range. Output format is compatible with the format
|
||||
* accepted as input by bitmap_parselist().
|
||||
*
|
||||
* The return value is the number of characters which were written to *buf
|
||||
* excluding the trailing '\0', as per ISO C99's scnprintf.
|
||||
*/
|
||||
int bitmap_scnlistprintf(char *buf, unsigned int buflen,
|
||||
const unsigned long *maskp, int nmaskbits)
|
||||
{
|
||||
return scnprintf(buf, buflen, "%*pbl", nmaskbits, maskp);
|
||||
}
|
||||
EXPORT_SYMBOL(bitmap_scnlistprintf);
|
||||
|
||||
/**
|
||||
* bitmap_print_to_pagebuf - convert bitmap to list or hex format ASCII string
|
||||
* @list: indicates whether the bitmap must be list
|
||||
|
||||
Reference in New Issue
Block a user