mirror of
https://github.com/ipxe/ipxe
synced 2026-02-03 06:34:32 +03:00
[acpi] Remove userptr_t from ACPI table parsing
Simplify the ACPI table parsing code by assuming that all table content is fully accessible via pointer dereferences. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -42,7 +42,7 @@ struct linux_acpi_table {
|
||||
/** Index */
|
||||
unsigned int index;
|
||||
/** Cached data */
|
||||
userptr_t data;
|
||||
void *data;
|
||||
};
|
||||
|
||||
/** List of cached ACPI tables */
|
||||
@@ -53,9 +53,10 @@ static LIST_HEAD ( linux_acpi_tables );
|
||||
*
|
||||
* @v signature Requested table signature
|
||||
* @v index Requested index of table with this signature
|
||||
* @ret table Table, or UNULL if not found
|
||||
* @ret table Table, or NULL if not found
|
||||
*/
|
||||
static userptr_t linux_acpi_find ( uint32_t signature, unsigned int index ) {
|
||||
static const struct acpi_header * linux_acpi_find ( uint32_t signature,
|
||||
unsigned int index ) {
|
||||
struct linux_acpi_table *table;
|
||||
struct acpi_header *header;
|
||||
union {
|
||||
@@ -121,7 +122,7 @@ static userptr_t linux_acpi_find ( uint32_t signature, unsigned int index ) {
|
||||
err_read:
|
||||
free ( table );
|
||||
err_alloc:
|
||||
return UNULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user