[PATCH v5 15/28] efi: Move exit_boot_services into a function
Simon Glass
sjg at chromium.org
Fri Dec 17 17:37:18 CET 2021
Hi Heinrich,
On Sat, 4 Dec 2021 at 12:13, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> On 12/4/21 16:56, Simon Glass wrote:
> > At present this code is inline in the app and stub. But they do the same
> > thing. The difference is that the stub does it immediately and the app
> > doesn't want to do it until the end (when it boots a kernel) or not at
> > all, if returning to UEFI.
> >
> > Move it into a function so it can be called as needed.
> >
> > Also store the memory map so that it can be accessed within the app if
> > needed.
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > ---
> >
> > (no changes since v2)
> >
> > Changes in v2:
> > - Add a sentence about what the patch does
> >
> > include/efi.h | 32 ++++++++++++++++++++++
> > lib/efi/efi.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++
> > lib/efi/efi_app.c | 3 ++
> > lib/efi/efi_stub.c | 66 ++++++++------------------------------------
> > 4 files changed, 114 insertions(+), 55 deletions(-)
> >
[..]
> > +/**
> > + * efi_store_memory_map() - Collect the memory-map info from EFI
> > + *
> > + * Collect the memory info and store it for later use, e.g. in calling
> > + * exit_boot_services()
> > + *
> > + * @priv: Pointer to private EFI structure
> > + * @return 0 if OK, non-zero on error
>
> %s/@return/Return:/
I will have to try to remember that. We are on our 3rd comment style now.
>
> Cf.
> https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html#function-documentation
>
[..]
>
> Missing function description
>
> > +int efi_call_exit_boot_services(void)
Putting your comment above the code you refer to defeats 'patman
status -C', so could you please put it below?
The comment is in the header file as this is an exported function.
Regards,
Simon
More information about the U-Boot
mailing list