From bbc78592b16d164fbb252455d6a60afb3ee52709 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sat, 22 Mar 2025 00:21:17 +0100 Subject: acpi: simplify updating header checksum Use acpi_update_checksum() for updating ACPI table header checksum. Signed-off-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas Reviewed-by: Matthias Brugger --- lib/acpi/base.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/acpi/base.c') diff --git a/lib/acpi/base.c b/lib/acpi/base.c index 8b6af2bc43a..5c755b14c16 100644 --- a/lib/acpi/base.c +++ b/lib/acpi/base.c @@ -50,8 +50,7 @@ static void acpi_write_rsdt(struct acpi_rsdt *rsdt) /* Entries are filled in later, we come with an empty set */ /* Fix checksum */ - header->checksum = table_compute_checksum(rsdt, - sizeof(struct acpi_rsdt)); + acpi_update_checksum(header); } static void acpi_write_xsdt(struct acpi_xsdt *xsdt) @@ -66,8 +65,7 @@ static void acpi_write_xsdt(struct acpi_xsdt *xsdt) /* Entries are filled in later, we come with an empty set */ /* Fix checksum */ - header->checksum = table_compute_checksum(xsdt, - sizeof(struct acpi_xsdt)); + acpi_update_checksum(header); } static int acpi_write_base(struct acpi_ctx *ctx, -- cgit v1.2.3