mirror of
https://github.com/ipxe/ipxe
synced 2026-02-14 02:31:26 +03:00
[acpi] Eliminate redundant acpi_find_rsdt() in acpi_sx()
The result from acpi_find_rsdt() is used only for the debug message. Simplify the debug message and remove the otherwise redundant call to acpi_find_rsdt(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -259,20 +259,12 @@ static int acpi_sx_zsdt ( userptr_t zsdt, uint32_t signature ) {
|
|||||||
*/
|
*/
|
||||||
int acpi_sx ( uint32_t signature ) {
|
int acpi_sx ( uint32_t signature ) {
|
||||||
struct acpi_fadt fadtab;
|
struct acpi_fadt fadtab;
|
||||||
userptr_t rsdt;
|
|
||||||
userptr_t fadt;
|
userptr_t fadt;
|
||||||
userptr_t dsdt;
|
userptr_t dsdt;
|
||||||
userptr_t ssdt;
|
userptr_t ssdt;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
int sx;
|
int sx;
|
||||||
|
|
||||||
/* Locate RSDT */
|
|
||||||
rsdt = acpi_find_rsdt();
|
|
||||||
if ( ! rsdt ) {
|
|
||||||
DBG ( "RSDT not found\n" );
|
|
||||||
return -ENOENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Try DSDT first */
|
/* Try DSDT first */
|
||||||
fadt = acpi_find ( FADT_SIGNATURE, 0 );
|
fadt = acpi_find ( FADT_SIGNATURE, 0 );
|
||||||
if ( fadt ) {
|
if ( fadt ) {
|
||||||
@@ -291,8 +283,8 @@ int acpi_sx ( uint32_t signature ) {
|
|||||||
return sx;
|
return sx;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBGC ( colour, "RSDT %#08lx could not find \\_Sx \"%s\"\n",
|
DBGC ( colour, "ACPI could not find \\_Sx \"%s\"\n",
|
||||||
user_to_phys ( rsdt, 0 ), acpi_name ( signature ) );
|
acpi_name ( signature ) );
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user