[PATCH 1/1] acpi: simplify acpi_write_ssdt()

* Converting to void * is superfluous when calling memset(). * acpi_fill_header() already fills oem_table_id.
Fixes: d953137526cc ("x86: Move SSDT table to a writer function") Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- lib/acpi/ssdt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/acpi/ssdt.c b/lib/acpi/ssdt.c index 659c1aad40..b140b4b2ff 100644 --- a/lib/acpi/ssdt.c +++ b/lib/acpi/ssdt.c @@ -18,10 +18,9 @@ int acpi_write_ssdt(struct acpi_ctx *ctx, const struct acpi_writer *entry) int ret;
ssdt = ctx->current; - memset((void *)ssdt, '\0', sizeof(struct acpi_table_header)); + memset(ssdt, '\0', sizeof(struct acpi_table_header));
acpi_fill_header(ssdt, "SSDT"); - memcpy(ssdt->oem_table_id, OEM_TABLE_ID, sizeof(ssdt->oem_table_id)); ssdt->revision = acpi_get_table_revision(ACPITAB_SSDT); ssdt->aslc_revision = 1; ssdt->length = sizeof(struct acpi_table_header);

On Sat, 18 Nov 2023 at 14:52, Heinrich Schuchardt heinrich.schuchardt@canonical.com wrote:
- Converting to void * is superfluous when calling memset().
- acpi_fill_header() already fills oem_table_id.
Fixes: d953137526cc ("x86: Move SSDT table to a writer function") Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
lib/acpi/ssdt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Sat, 18 Nov 2023 at 14:52, Heinrich Schuchardt heinrich.schuchardt@canonical.com wrote:
- Converting to void * is superfluous when calling memset().
- acpi_fill_header() already fills oem_table_id.
Fixes: d953137526cc ("x86: Move SSDT table to a writer function") Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
lib/acpi/ssdt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot-dm/next, thanks!
participants (2)
-
Heinrich Schuchardt
-
Simon Glass