Skip to content

Commit f4ed0de

Browse files
Paul Jacksontorvalds
authored andcommitted
cpumask: remove bitmap_scnprintf_len and cpumask_scnprintf_len
They aren't used. They were briefly used as part of some other patches to provide an alternative format for displaying some /proc and /sys cpumasks. They probably should have been removed when those other patches were dropped, in favor of a different solution. Signed-off-by: Paul Jackson <[email protected]> Cc: "Mike Travis" <[email protected]> Cc: "Bert Wesarg" <[email protected]> Cc: Alexey Dobriyan <[email protected]> Cc: WANG Cong <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 53c78dd commit f4ed0de

File tree

3 files changed

+0
-24
lines changed

3 files changed

+0
-24
lines changed

include/linux/bitmap.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ extern int __bitmap_weight(const unsigned long *bitmap, int bits);
110110

111111
extern int bitmap_scnprintf(char *buf, unsigned int len,
112112
const unsigned long *src, int nbits);
113-
extern int bitmap_scnprintf_len(unsigned int len);
114113
extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user,
115114
unsigned long *dst, int nbits);
116115
extern int bitmap_parse_user(const char __user *ubuf, unsigned int ulen,

include/linux/cpumask.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -289,13 +289,6 @@ static inline int __cpumask_scnprintf(char *buf, int len,
289289
return bitmap_scnprintf(buf, len, srcp->bits, nbits);
290290
}
291291

292-
#define cpumask_scnprintf_len(len) \
293-
__cpumask_scnprintf_len((len))
294-
static inline int __cpumask_scnprintf_len(int len)
295-
{
296-
return bitmap_scnprintf_len(len);
297-
}
298-
299292
#define cpumask_parse_user(ubuf, ulen, dst) \
300293
__cpumask_parse_user((ubuf), (ulen), &(dst), NR_CPUS)
301294
static inline int __cpumask_parse_user(const char __user *buf, int len,

lib/bitmap.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -315,22 +315,6 @@ int bitmap_scnprintf(char *buf, unsigned int buflen,
315315
}
316316
EXPORT_SYMBOL(bitmap_scnprintf);
317317

318-
/**
319-
* bitmap_scnprintf_len - return buffer length needed to convert
320-
* bitmap to an ASCII hex string.
321-
* @len: number of bits to be converted
322-
*/
323-
int bitmap_scnprintf_len(unsigned int len)
324-
{
325-
/* we need 9 chars per word for 32 bit words (8 hexdigits + sep/null) */
326-
int bitslen = ALIGN(len, CHUNKSZ);
327-
int wordlen = CHUNKSZ / 4;
328-
int buflen = (bitslen / wordlen) * (wordlen + 1) * sizeof(char);
329-
330-
return buflen;
331-
}
332-
EXPORT_SYMBOL(bitmap_scnprintf_len);
333-
334318
/**
335319
* __bitmap_parse - convert an ASCII hex string into a bitmap.
336320
* @buf: pointer to buffer containing string.

0 commit comments

Comments
 (0)