[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] acpi: remove useless code in acpi.c
From: |
Andrea Monaco |
Subject: |
[PATCH] acpi: remove useless code in acpi.c |
Date: |
Thu, 18 Nov 2021 17:41:00 +0100 |
Hello,
I think those lines are not meaningful: they write to an array and then
never use it. Maybe they were useful for debugging. Anyway, now they
can probably be removed.
Warmly,
Andrea Monaco
diff --git a/acpi/acpi.c b/acpi/acpi.c
index 63066aaf..acbf79c7 100644
--- a/acpi/acpi.c
+++ b/acpi/acpi.c
@@ -139,8 +139,6 @@ acpi_get_num_tables(size_t *num_tables)
err = mmap_phys_acpi_header(acpi_ptr32, &next, &virt_addr2, fd_mem);
}
- char name[5] = { 0 };
- snprintf(name, 5, "%s", &next->signature[0]);
if (next->signature[0] == '\0' || next->length == 0) {
munmap(virt_addr2, ESCD_SIZE);
continue;
@@ -257,8 +255,6 @@ acpi_get_tables(struct acpi_table **tables)
}
}
- char name[5] = { 0 };
- snprintf(name, 5, "%s", &next->signature[0]);
if (next->signature[0] == '\0' || next->length == 0) {
munmap(virt_addr2, ESCD_SIZE);
continue;
- [PATCH] acpi: remove useless code in acpi.c,
Andrea Monaco <=