]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Revert "acpi_table: Fix coverity defect in acpi_write_spcr"
authorTom Rini <trini@konsulko.com>
Tue, 29 Oct 2024 02:53:34 +0000 (20:53 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 29 Oct 2024 02:53:34 +0000 (20:53 -0600)
This commit introduces a number of failure to build issues. For now,
revert it and we will wait for v2 to address the issue and the build
problems as well.

This reverts commit e1c3c720e780eed6647796d69dca6184640234a5.

Signed-off-by: Tom Rini <trini@konsulko.com>
lib/acpi/acpi_table.c

index b9e12228fda3afffff71e819e086a67e3b630de3..6473d95c1028d6e92588be8fc57eb50861cc36e1 100644 (file)
@@ -420,7 +420,7 @@ int acpi_write_dbg2_pci_uart(struct acpi_ctx *ctx, struct udevice *dev,
 static int acpi_write_spcr(struct acpi_ctx *ctx, const struct acpi_writer *entry)
 {
        struct serial_device_info serial_info = {0};
-       u64 serial_address, serial_offset;
+       ulong serial_address, serial_offset;
        struct acpi_table_header *header;
        struct acpi_spcr *spcr;
        struct udevice *dev;
@@ -473,7 +473,7 @@ static int acpi_write_spcr(struct acpi_ctx *ctx, const struct acpi_writer *entry
        }
 
        serial_width = serial_info.reg_width * 8;
-       serial_offset = ((u64)serial_info.reg_offset) << serial_info.reg_shift;
+       serial_offset = serial_info.reg_offset << serial_info.reg_shift;
        serial_address = serial_info.addr + serial_offset;
 
        /* Encode register access size */