* [PATCH v2] printf: Remove unused 'bprintf'
@ 2024-10-02 17:31 linux
2024-10-03 8:13 ` Petr Mladek
0 siblings, 1 reply; 7+ messages in thread
From: linux @ 2024-10-02 17:31 UTC (permalink / raw)
To: kees, andy, akpm, pmladek, rostedt, linux, senozhatsky
Cc: linux-hardening, linux-kernel, Dr. David Alan Gilbert
From: "Dr. David Alan Gilbert" <linux@treblig.org>
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.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Andy Shevchenko <andy@kernel.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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2] printf: Remove unused 'bprintf'
2024-10-02 17:31 [PATCH v2] printf: Remove unused 'bprintf' linux
@ 2024-10-03 8:13 ` Petr Mladek
2024-10-03 15:13 ` Steven Rostedt
0 siblings, 1 reply; 7+ messages in thread
From: Petr Mladek @ 2024-10-03 8:13 UTC (permalink / raw)
To: linux
Cc: kees, andy, akpm, rostedt, linux, senozhatsky, linux-hardening,
linux-kernel
On Wed 2024-10-02 18:31:47, linux@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
>
> 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.
>
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> Reviewed-by: Andy Shevchenko <andy@kernel.org>
Looks good to me:
Acked-by: Petr Mladek <pmladek@suse.com>
I assume that Sven is going to take it via the ftrace tree as he
suggested at https://lore.kernel.org/r/20241002104807.42b4b64e@gandalf.local.home
Best Regards,
Petr
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] printf: Remove unused 'bprintf'
2024-10-03 8:13 ` Petr Mladek
@ 2024-10-03 15:13 ` Steven Rostedt
2024-12-01 2:47 ` Dr. David Alan Gilbert
0 siblings, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2024-10-03 15:13 UTC (permalink / raw)
To: Petr Mladek
Cc: linux, kees, andy, akpm, linux, senozhatsky, linux-hardening,
linux-kernel
On Thu, 3 Oct 2024 10:13:34 +0200
Petr Mladek <pmladek@suse.com> wrote:
> On Wed 2024-10-02 18:31:47, linux@treblig.org wrote:
> > From: "Dr. David Alan Gilbert" <linux@treblig.org>
> >
> > 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.
> >
> > Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> > Reviewed-by: Andy Shevchenko <andy@kernel.org>
>
> Looks good to me:
>
> Acked-by: Petr Mladek <pmladek@suse.com>
>
> I assume that Sven is going to take it via the ftrace tree as he
Steven ;-)
> suggested at https://lore.kernel.org/r/20241002104807.42b4b64e@gandalf.local.home
Yeah, since I'm basically the only user of it, it's best it goes through my
testing.
Thanks,
-- Steve
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] printf: Remove unused 'bprintf'
2024-10-03 15:13 ` Steven Rostedt
@ 2024-12-01 2:47 ` Dr. David Alan Gilbert
2024-12-01 3:39 ` Steven Rostedt
0 siblings, 1 reply; 7+ messages in thread
From: Dr. David Alan Gilbert @ 2024-12-01 2:47 UTC (permalink / raw)
To: Steven Rostedt
Cc: Petr Mladek, kees, andy, akpm, linux, senozhatsky,
linux-hardening, linux-kernel
* Steven Rostedt (rostedt@goodmis.org) wrote:
> On Thu, 3 Oct 2024 10:13:34 +0200
> Petr Mladek <pmladek@suse.com> wrote:
>
> > On Wed 2024-10-02 18:31:47, linux@treblig.org wrote:
> > > From: "Dr. David Alan Gilbert" <linux@treblig.org>
> > >
> > > 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.
> > >
> > > Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> > > Reviewed-by: Andy Shevchenko <andy@kernel.org>
> >
> > Looks good to me:
> >
> > Acked-by: Petr Mladek <pmladek@suse.com>
> >
> > I assume that Sven is going to take it via the ftrace tree as he
>
> Steven ;-)
>
> > suggested at https://lore.kernel.org/r/20241002104807.42b4b64e@gandalf.local.home
>
> 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
> Thanks,
>
> -- Steve
>
>
--
-----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 |_______/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] printf: Remove unused 'bprintf'
2024-12-01 2:47 ` Dr. David Alan Gilbert
@ 2024-12-01 3:39 ` Steven Rostedt
2024-12-01 11:58 ` Dr. David Alan Gilbert
0 siblings, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2024-12-01 3:39 UTC (permalink / raw)
To: Dr. David Alan Gilbert
Cc: Petr Mladek, kees, andy, akpm, linux, senozhatsky,
linux-hardening, linux-kernel
On Sun, 1 Dec 2024 02:47:49 +0000
"Dr. David Alan Gilbert" <linux@treblig.org> wrote:
> > > suggested at https://lore.kernel.org/r/20241002104807.42b4b64e@gandalf.local.home
> >
> > 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] printf: Remove unused 'bprintf'
2024-12-01 3:39 ` Steven Rostedt
@ 2024-12-01 11:58 ` Dr. David Alan Gilbert
2024-12-01 16:19 ` Steven Rostedt
0 siblings, 1 reply; 7+ messages in thread
From: Dr. David Alan Gilbert @ 2024-12-01 11:58 UTC (permalink / raw)
To: Steven Rostedt
Cc: Petr Mladek, kees, andy, akpm, linux, senozhatsky,
linux-hardening, linux-kernel
* Steven Rostedt (rostedt@goodmis.org) wrote:
> On Sun, 1 Dec 2024 02:47:49 +0000
> "Dr. David Alan Gilbert" <linux@treblig.org> wrote:
>
> > > > suggested at https://lore.kernel.org/r/20241002104807.42b4b64e@gandalf.local.home
> > >
> > > 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.
> 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
> -- Steve
>
--
-----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 |_______/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] printf: Remove unused 'bprintf'
2024-12-01 11:58 ` Dr. David Alan Gilbert
@ 2024-12-01 16:19 ` Steven Rostedt
0 siblings, 0 replies; 7+ messages in thread
From: Steven Rostedt @ 2024-12-01 16:19 UTC (permalink / raw)
To: Dr. David Alan Gilbert
Cc: Petr Mladek, kees, andy, akpm, linux, senozhatsky,
linux-hardening, linux-kernel
On Sun, 1 Dec 2024 11:58:09 +0000
"Dr. David Alan Gilbert" <linux@treblig.org> wrote:
> > 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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-12-01 16:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-02 17:31 [PATCH v2] printf: Remove unused 'bprintf' linux
2024-10-03 8:13 ` Petr Mladek
2024-10-03 15:13 ` Steven Rostedt
2024-12-01 2:47 ` Dr. David Alan Gilbert
2024-12-01 3:39 ` Steven Rostedt
2024-12-01 11:58 ` Dr. David Alan Gilbert
2024-12-01 16:19 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox