x86: acpi: Remove unneeded assignment

Is rsdp_phys is assigned in the loop below code jumps to found label,
otherwise we return and value rsdp_phys is never used after 0
assignment.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
Andrei Emeltchenko 2023-08-21 15:24:03 +03:00 committed by Fabio Baltieri
commit 6e69d759a5

View file

@ -27,7 +27,7 @@ static void find_rsdp(void)
{
uint8_t *bda_seg, *zero_page_base;
uint64_t *search;
uintptr_t search_phys, rsdp_phys = 0U;
uintptr_t search_phys, rsdp_phys;
size_t search_length = 0U, rsdp_length;
if (is_rsdp_searched) {
@ -94,7 +94,6 @@ static void find_rsdp(void)
search_length = 128 * 1024;
z_phys_map((uint8_t **)&search, search_phys, search_length, 0);
rsdp_phys = 0U;
for (int i = 0; i < 128*1024/8; i++) {
if (search[i] == ACPI_RSDP_SIGNATURE) {
rsdp_phys = search_phys + i * 8;