mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04: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
@@ -91,42 +91,6 @@ int seq_buf_printf(struct seq_buf *s, const char *fmt, ...)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* seq_buf_bitmask - write a bitmask array in its ASCII representation
|
||||
* @s: seq_buf descriptor
|
||||
* @maskp: points to an array of unsigned longs that represent a bitmask
|
||||
* @nmaskbits: The number of bits that are valid in @maskp
|
||||
*
|
||||
* Writes a ASCII representation of a bitmask string into @s.
|
||||
*
|
||||
* Returns zero on success, -1 on overflow.
|
||||
*/
|
||||
int seq_buf_bitmask(struct seq_buf *s, const unsigned long *maskp,
|
||||
int nmaskbits)
|
||||
{
|
||||
unsigned int len = seq_buf_buffer_left(s);
|
||||
int ret;
|
||||
|
||||
WARN_ON(s->size == 0);
|
||||
|
||||
/*
|
||||
* Note, because bitmap_scnprintf() only returns the number of bytes
|
||||
* written and not the number that would be written, we use the last
|
||||
* byte of the buffer to let us know if we overflowed. There's a small
|
||||
* chance that the bitmap could have fit exactly inside the buffer, but
|
||||
* it's not that critical if that does happen.
|
||||
*/
|
||||
if (len > 1) {
|
||||
ret = bitmap_scnprintf(s->buffer + s->len, len, maskp, nmaskbits);
|
||||
if (ret < len) {
|
||||
s->len += ret;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
seq_buf_set_overflow(s);
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BINARY_PRINTF
|
||||
/**
|
||||
* seq_buf_bprintf - Write the printf string from binary arguments
|
||||
|
||||
Reference in New Issue
Block a user