printf: Remove unused 'bprintf'
Subsystems (3)
PATCH v2 1/1 printf: Remove unused 'bprintf'
From: "Dr. David Alan Gilbert" <[email protected]>
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.
--- include/linux/string.h | 1 - lib/vsprintf.c | 23 ----------------------- 2 files changed, 24 deletions(-)
include/linux/string.h +0 -1
@@ -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,
lib/vsprintf.c +0 -23
@@ -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 */ /**
Signature · 1 line
2.46.2
Quoted 8 lines · On Wed 2024-10-02 18:31:47, [email protected] wrote:
From: "Dr. David Alan Gilbert" <[email protected]>
bprintf()is unused. Remove it. It was added in the commit4370aa4aa753("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 <[email protected]>Reviewed-by Andy Shevchenko <[email protected]>
Looks good to me:
I assume that Sven is going to take it via the ftrace tree as he suggested at https://lore.kernel.org/r/[email protected]
Best Regards,
Petr
Steven Rostedt
maintainerQuoted 7 lines · On Thu, 3 Oct 2024 10:13:34 +0200 Petr Mladek <[email protected]> wrote:
Quoted 6 lines · On Wed 2024-10-02 18:31:47, [email protected] wrote:
From: "Dr. David Alan Gilbert" <[email protected]>
bprintf()is unused. Remove it. It was added in the commit4370aa4aa753("vsprintf: add binary printf") but as far as I can see was never used, unlike the other two functions in that patch.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Dr. David Alan Gilbert <[email protected]>Reviewed-by Andy Shevchenko <[email protected]>Looks good to me:
Acked-by Petr Mladek <[email protected]>I assume that Sven is going to take it via the ftrace tree as he
Steven ;-)
Quoted 1 line
suggested at https://lore.kernel.org/r/[email protected]
Yeah, since I'm basically the only user of it, it's best it goes through my testing.
Thanks,
-- Steve
Quoted 17 lines · * Steven Rostedt ([email protected]) wrote:
Quoted 14 lines · On Thu, 3 Oct 2024 10:13:34 +0200 Petr Mladek <[email protected]> wrote:
Quoted 8 lines · On Wed 2024-10-02 18:31:47, [email protected] wrote:
From: "Dr. David Alan Gilbert" <[email protected]>
bprintf()is unused. Remove it. It was added in the commit4370aa4aa753("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 <[email protected]>Reviewed-by Andy Shevchenko <[email protected]>Looks good to me:
Acked-by Petr Mladek <[email protected]>
Quoted 8 lines
Quoted 1 line
I assume that Sven is going to take it via the ftrace tree as he
Steven ;-)Quoted 1 line
suggested at https://lore.kernel.org/r/[email protected]
Yeah, since I'm basically the only user of it, it's best it goes through my testing.
Hmm, did you pick this one up?
Dave
Quoted 5 lines
Thanks,
-- Steve
Signature · 4 lines
-----Open up your eyes, open up your mind, open up your code ------- / Dr. David Alan Gilbert | Running GNU/Linux | Happy \ \ dave @ treblig.org | | In Hex / \ _________________________|_____ http://www.treblig.org |_______/
Steven Rostedt
maintainerQuoted 6 lines · On Sun, 1 Dec 2024 02:47:49 +0000 "Dr. David Alan Gilbert" <[email protected]>…
Quoted 4 lines
Quoted 1 line
suggested at https://lore.kernel.org/r/[email protected]
Yeah, since I'm basically the only user of it, it's best it goes through my testing.
Hmm, did you pick this one up?
Sorry, it wasn't in my patchwork and was missed. I can add it and Linus may even take it after -rc1. Or I'll have it in iinux-next for the next merge window.
-- Steve
Quoted 11 lines · * Steven Rostedt ([email protected]) wrote:
Quoted 6 lines · On Sun, 1 Dec 2024 02:47:49 +0000 "Dr. David Alan Gilbert" <[email protected]>…
Quoted 4 lines
Quoted 1 line
suggested at https://lore.kernel.org/r/[email protected]
Yeah, since I'm basically the only user of it, it's best it goes through my testing.
Hmm, did you pick this one up?
Sorry, it wasn't in my patchwork and was missed.
No problem.
Quoted 3 lines
I can add it and Linus
may even take it after -rc1. Or I'll have it in iinux-next for the next merge window.
Please do; no rush.
Dave
Quoted 2 lines
-- Steve
Signature · 4 lines
-----Open up your eyes, open up your mind, open up your code ------- / Dr. David Alan Gilbert | Running GNU/Linux | Happy \ \ dave @ treblig.org | | In Hex / \ _________________________|_____ http://www.treblig.org |_______/
Steven Rostedt
maintainerQuoted 5 lines · On Sun, 1 Dec 2024 11:58:09 +0000 "Dr. David Alan Gilbert" <[email protected]>…
Quoted 3 lines
I can add it and Linus
may even take it after -rc1. Or I'll have it in iinux-next for the next merge window.Please do; no rush.
It's not a big change, and Linus likes removal of code. I'll send it to him now and let him decide to take it or not. It passed all my tests.
-- Steve