[PATCH 07/16] efi/zboot: Lift efi_cache_sync_image() from efi_zboot_decompress()
Jason Gunthorpe
jgg at nvidia.com
Thu Sep 24 16:53:02 PDT 2026
On Thu, Sep 24, 2026 at 03:57:21PM -0700, Jonathan Cameron wrote:
> On Thu, 24 Sep 2026 10:53:10 -0300
> Jason Gunthorpe <jgg at nvidia.com> wrote:
>
> > The two decompressors duplicate this call and the next patch needs to
> > change the argument. Hoist it up to remove the duplication.
> >
> > Signed-off-by: Jason Gunthorpe <jgg at nvidia.com>
>
> > diff --git a/drivers/firmware/efi/libstub/zboot.c b/drivers/firmware/efi/libstub/zboot.c
> > index 4b76f74c56dae0..960a542881d875 100644
> > --- a/drivers/firmware/efi/libstub/zboot.c
> > +++ b/drivers/firmware/efi/libstub/zboot.c
> > @@ -92,9 +92,12 @@ efi_zboot_entry(efi_handle_t handle, efi_system_table_t *systab)
> > }
> >
> > // Decompress the payload into the newly allocated buffer
> > - status = efi_zboot_decompress((void *)image_base, alloc_size) ?:
> > - efi_stub_common(handle, image, image_base, cmdline_ptr);
> > -
> > + status = efi_zboot_decompress((void *)image_base, alloc_size);
> > + if (status == EFI_SUCCESS) {
> > + efi_cache_sync_image(image_base, alloc_size);
> > + status =
> > + efi_stub_common(handle, image, image_base, cmdline_ptr);
>
> Just go one character longer!
OK! You have good eyes to notice that! I use clang-format and stopped
caring! The flexible 80 unless you need it unless you are in the wrong
subsystem scares me!
Thanks,
Jason
More information about the linux-riscv
mailing list