On Thu, Nov 16, 2023 at 08:22:44AM +0100, Sascha Hauer wrote: > On Mon, Nov 13, 2023 at 08:00:35PM +0100, Uwe Kleine-König wrote: > > All callers apart from lib/uncompress.c itself only use memory-to-memory > > decompression. Simplify the calls accordingly. > > > > Note that two of three callers passed error_fn=NULL. As the uncompress > > function calls error_fn() unconditionally on error, this might yield > > undefined behaviour and so the new uncompress function uses > > uncompress_err_stdout() as error function which isn't worse for sure. > > > > Signed-off-by: Uwe Kleine-König > > --- > > arch/arm/cpu/start.c | 2 +- > > arch/riscv/boot/start.c | 2 +- > > defaultenv/defaultenv.c | 4 +--- > > include/uncompress.h | 7 +------ > > lib/uncompress.c | 24 +++++++++++++++--------- > > 5 files changed, 19 insertions(+), 20 deletions(-) > > I had to revert this one. You missed one call site of uncompress() in > uimage_load(). That one can't be converted as it uses the fill argument > to uncompress(). Yes indeed. Missed that because I grepped for "uncompress(", sorry! That instance might be converted to uncompress_fd_to_buf, but that's not completely trivial. I'll take a look. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |