]> www.infradead.org Git - nvme.git/commitdiff
printf: Remove unused 'bprintf'
authorDr. David Alan Gilbert <linux@treblig.org>
Wed, 2 Oct 2024 17:31:47 +0000 (18:31 +0100)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Sun, 1 Dec 2024 03:41:35 +0000 (22:41 -0500)
bprintf() is unused. Remove it. It was added in the commit 4370aa4aa753
("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/20241002173147.210107-1-linux@treblig.org
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Acked-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
include/linux/string.h
lib/vsprintf.c

index 0dd27afcfaf76b507ccb72ee8508534ae2fb903f..493ac4862c77771ada8f12737277204e475eecc3 100644 (file)
@@ -335,7 +335,6 @@ int __sysfs_match_string(const char * const *array, size_t n, const char *s);
 #ifdef CONFIG_BINARY_PRINTF
 int vbin_printf(u32 *bin_buf, size_t size, const char *fmt, va_list args);
 int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf);
-int bprintf(u32 *bin_buf, size_t size, const char *fmt, ...) __printf(3, 4);
 #endif
 
 extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos,
index 6ac02bbb7df14e432699c70c2f2ac6479407728f..9d3dac38a3f4a0f046b0f94d89d1a83f4e46c51f 100644 (file)
@@ -3428,29 +3428,6 @@ out:
 }
 EXPORT_SYMBOL_GPL(bstr_printf);
 
-/**
- * bprintf - Parse a format string and place args' binary value in a buffer
- * @bin_buf: The buffer to place args' binary value
- * @size: The size of the buffer(by words(32bits), not characters)
- * @fmt: The format string to use
- * @...: Arguments for the format string
- *
- * The function returns the number of words(u32) written
- * into @bin_buf.
- */
-int bprintf(u32 *bin_buf, size_t size, const char *fmt, ...)
-{
-       va_list args;
-       int ret;
-
-       va_start(args, fmt);
-       ret = vbin_printf(bin_buf, size, fmt, args);
-       va_end(args);
-
-       return ret;
-}
-EXPORT_SYMBOL_GPL(bprintf);
-
 #endif /* CONFIG_BINARY_PRINTF */
 
 /**