From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Date: Fri, 3 Apr 2020 16:24:06 +0300 Subject: [PATCH v3 23/29] acpi: Convert part of acpi_table to use acpi_ctx In-Reply-To: <20200330171226.v3.23.I93e1e33891714417335e1dd517982b18bf9f882f@changeid> References: <20200330231305.130488-1-sjg@chromium.org> <20200330171226.v3.23.I93e1e33891714417335e1dd517982b18bf9f882f@changeid> Message-ID: <20200403132406.GI3676135@smile.fi.intel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Mar 30, 2020 at 05:12:59PM -0600, Simon Glass wrote: > 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. ... > +void acpi_align(struct acpi_ctx *ctx); > +void acpi_align64(struct acpi_ctx *ctx); In the code, it will be not understandable the difference. align without number would be good if the function only single one. So, align16() much better. > +void acpi_inc(struct acpi_ctx *ctx, uint amount); inc with amount is not inc, it's rather add. > + * acpi_inc_align() - Increment the ACPI output pointer by a bit and align Align how? > +void acpi_inc_align(struct acpi_ctx *ctx, uint amount); -- With Best Regards, Andy Shevchenko