Re: [PATCH] printf: Remove unused 'bprintf'

From: Dr. David Alan Gilbert
Date: Wed Oct 02 2024 - 10:37:55 EST


* Andy Shevchenko (andy@xxxxxxxxxx) wrote:
> On Wed, Oct 02, 2024 at 02:21:25AM +0100, linux@xxxxxxxxxxx wrote:
> > From: "Dr. David Alan Gilbert" <linux@xxxxxxxxxxx>
> >
> > bprintf is unused. Remove it.
>
> bprintf()

OK.

> > 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.
>
> Please, rewrap these lines to use more room on each line.

Something like this? :

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.


> ...
>
> I am not familiar with tricks in BPF or ftrace code where this actually might
> be implicitly called via a macro, but brief grep gives nothing that might point
> to that.

I've got an all-yes build (well, most after I took out broken stuff) booting
with it, and it has CONFIG_BINARY_PRINTF=y and CONFIG_FTRACE=y .

trace_seq.c uses seq_buf_bprintf which uses bstr_printf rather than the plain
bprintf() that I've deleted.
Not sure where to dig in BPF, but I've had a fairly good grep around.

> Hence, with the amended commit message
>
> Reviewed-by: Andy Shevchenko <andy@xxxxxxxxxx>

Thanks!

> P.S. I hope we may rely in CIs to report issues soon, if any.

Sure

Dave

> --
> With Best Regards,
> Andy Shevchenko
>
>
>
--
-----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 |_______/