Hi Simon, -----"Simon Glass" <s...@chromium.org> schrieb: -----
> Hi Wolfgang, > > On Wed, 11 Mar 2020 at 06:58, Wolfgang Wallner > <wolfgang.wall...@br-automation.com> wrote: > > > > Hi Simon, > > > > -----"Simon Glass" <s...@chromium.org> schrieb: ----- > > > > > > The current code uses an address but a pointer would result in fewer > > > casts. Also it repeats the alignment code in a lot of places so this > would > > > be better done in a helper function. > > > > > > Update write_acpi_tables() to make use of the new acpi_ctx structure, > > > adding a few helpers to clean things up. > > > > > > Signed-off-by: Simon Glass <s...@chromium.org> > > > --- > > > > > > Changes in v2: None > > > > > > arch/x86/lib/acpi_table.c | 88 +++++++++++++++++++-------------------- > > > include/acpi_table.h | 36 ++++++++++++++++ > > > lib/acpi/acpi_table.c | 22 ++++++++++ > > > test/dm/acpi.c | 28 +++++++++++++ > > > 4 files changed, 129 insertions(+), 45 deletions(-) > > > > > [..] > > > > +/** > > > + * acpi_align() - Align the ACPI output pointer to a 16-byte boundary > > > + * > > > + * @ctx: ACPI context > > > + */ > > > +void acpi_align(struct acpi_ctx *ctx); > > > > Nit: The function names acpi_align() and acpi_align_large() are both vague > > on the exact alignment that is used. > > How about acpi_align16() and acpi_align64() ? > > There is I think only one case where we use 64. Most of the time it is 16. > So I thought it was a bit silly to put 16 in the function name - it is the > standard alignment. > > Perhaps I should use align() and align64()? Yes, I'm fine with that. regards, Wolfgang