mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Sascha Hauer <sha@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] uncompress: simplify prototype of uncompress()
Date: Thu, 16 Nov 2023 09:01:35 +0100	[thread overview]
Message-ID: <20231116080135.oe2dv5q3wfnoa6z2@pengutronix.de> (raw)
In-Reply-To: <20231116072244.GS235829@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 1457 bytes --]

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 <u.kleine-koenig@pengutronix.de>
> > ---
> >  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/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2023-11-16  8:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13 19:00 Uwe Kleine-König
2023-11-15 13:10 ` Sascha Hauer
2023-11-16  7:22 ` Sascha Hauer
2023-11-16  8:01   ` Uwe Kleine-König [this message]

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=20231116080135.oe2dv5q3wfnoa6z2@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=sha@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox