Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bitmask: remove bitmap_scnprintf_len()

bitmap_scnprintf_len() is not used now, so we remove it.

Otherwise we have to maintain it and make its return
value always equal to bitmap_scnprintf()'s return value.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Paul Menage <menage@google.com>
Cc: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Lai Jiangshan and committed by
Linus Torvalds
c4596435 30e8e136

-12
-1
include/linux/bitmap.h
··· 110 110 111 111 extern int bitmap_scnprintf(char *buf, unsigned int len, 112 112 const unsigned long *src, int nbits); 113 - extern int bitmap_scnprintf_len(unsigned int nr_bits); 114 113 extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user, 115 114 unsigned long *dst, int nbits); 116 115 extern int bitmap_parse_user(const char __user *ubuf, unsigned int ulen,
-11
lib/bitmap.c
··· 316 316 EXPORT_SYMBOL(bitmap_scnprintf); 317 317 318 318 /** 319 - * bitmap_scnprintf_len - return buffer length needed to convert 320 - * bitmap to an ASCII hex string 321 - * @nr_bits: number of bits to be converted 322 - */ 323 - int bitmap_scnprintf_len(unsigned int nr_bits) 324 - { 325 - unsigned int nr_nibbles = ALIGN(nr_bits, 4) / 4; 326 - return nr_nibbles + ALIGN(nr_nibbles, CHUNKSZ / 4) / (CHUNKSZ / 4) - 1; 327 - } 328 - 329 - /** 330 319 * __bitmap_parse - convert an ASCII hex string into a bitmap. 331 320 * @buf: pointer to buffer containing string. 332 321 * @buflen: buffer size in bytes. If string is smaller than this