From: linux@treblig.org
To: kees@kernel.org, andy@kernel.org, akpm@linux-foundation.org,
pmladek@suse.com, rostedt@goodmis.org, linux@rasmusvillemoes.dk,
senozhatsky@chromium.org
Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org,
"Dr. David Alan Gilbert" <linux@treblig.org>
Subject: [PATCH] printf: Remove unused 'bprintf'
Date: Wed, 2 Oct 2024 02:21:25 +0100 [thread overview]
Message-ID: <20241002012125.405368-1-linux@treblig.org> (raw)
From: "Dr. David Alan Gilbert" <linux@treblig.org>
bprintf is unused. Remove it.
It was added in
commit 4370aa4aa753 ("vsprintf: add binary printf")
but as far as I can see was never used, unlike the other
two functions in that patch.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
include/linux/string.h | 1 -
lib/vsprintf.c | 23 -----------------------
2 files changed, 24 deletions(-)
diff --git a/include/linux/string.h b/include/linux/string.h
index 0dd27afcfaf7..493ac4862c77 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -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,
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 09f022ba1c05..d072cd59eb6a 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -3383,29 +3383,6 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
}
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 */
/**
--
2.46.2
next reply other threads:[~2024-10-02 1:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 1:21 linux [this message]
2024-10-02 14:11 ` [PATCH] printf: Remove unused 'bprintf' Andy Shevchenko
2024-10-02 14:31 ` Dr. David Alan Gilbert
2024-10-02 14:45 ` Andy Shevchenko
2024-10-02 14:52 ` Dr. David Alan Gilbert
2024-10-02 14:48 ` Steven Rostedt
2024-10-02 17:32 ` Dr. David Alan Gilbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241002012125.405368-1-linux@treblig.org \
--to=linux@treblig.org \
--cc=akpm@linux-foundation.org \
--cc=andy@kernel.org \
--cc=kees@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.