Skip to content

Commit f69e637

Browse files
Dr. David Alan Gilbertrostedt
Dr. David Alan Gilbert
authored andcommitted
printf: Remove unused 'bprintf'
bprintf() is unused. Remove it. It was added in the commit 4370aa4 ("vsprintf: add binary printf") but as far as I can see was never used, unlike the other two functions in that patch. Link: https://lore.kernel.org/[email protected] Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Petr Mladek <[email protected]> Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 7af08b5 commit f69e637

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

include/linux/string.h

-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ int __sysfs_match_string(const char * const *array, size_t n, const char *s);
335335
#ifdef CONFIG_BINARY_PRINTF
336336
int vbin_printf(u32 *bin_buf, size_t size, const char *fmt, va_list args);
337337
int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf);
338-
int bprintf(u32 *bin_buf, size_t size, const char *fmt, ...) __printf(3, 4);
339338
#endif
340339

341340
extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos,

lib/vsprintf.c

-23
Original file line numberDiff line numberDiff line change
@@ -3428,29 +3428,6 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
34283428
}
34293429
EXPORT_SYMBOL_GPL(bstr_printf);
34303430

3431-
/**
3432-
* bprintf - Parse a format string and place args' binary value in a buffer
3433-
* @bin_buf: The buffer to place args' binary value
3434-
* @size: The size of the buffer(by words(32bits), not characters)
3435-
* @fmt: The format string to use
3436-
* @...: Arguments for the format string
3437-
*
3438-
* The function returns the number of words(u32) written
3439-
* into @bin_buf.
3440-
*/
3441-
int bprintf(u32 *bin_buf, size_t size, const char *fmt, ...)
3442-
{
3443-
va_list args;
3444-
int ret;
3445-
3446-
va_start(args, fmt);
3447-
ret = vbin_printf(bin_buf, size, fmt, args);
3448-
va_end(args);
3449-
3450-
return ret;
3451-
}
3452-
EXPORT_SYMBOL_GPL(bprintf);
3453-
34543431
#endif /* CONFIG_BINARY_PRINTF */
34553432

34563433
/**

0 commit comments

Comments
 (0)