Skip to content

Commit 904aaf8

Browse files
Al Stonerafaeljw
authored andcommitted
ACPI / tables: improve comments regarding acpi_parse_entries_array()
I found the description of the table_size argument to the function acpi_parse_entries_array() unclear and ambiguous. This is a minor documentation change to improve that description so I don't misuse the argument again in the future, and it is hopefully clearer to other future users. Signed-off-by: Al Stone <[email protected]> [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 75bc37f commit 904aaf8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/acpi/tables.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header)
222222
* acpi_parse_entries_array - for each proc_num find a suitable subtable
223223
*
224224
* @id: table id (for debugging purposes)
225-
* @table_size: single entry size
225+
* @table_size: size of the root table
226226
* @table_header: where does the table start?
227227
* @proc: array of acpi_subtable_proc struct containing entry id
228228
* and associated handler with it
@@ -233,6 +233,11 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header)
233233
* on it. Assumption is that there's only single handler for particular
234234
* entry id.
235235
*
236+
* The table_size is not the size of the complete ACPI table (the length
237+
* field in the header struct), but only the size of the root table; i.e.,
238+
* the offset from the very first byte of the complete ACPI table, to the
239+
* first byte of the very first subtable.
240+
*
236241
* On success returns sum of all matching entries for all proc handlers.
237242
* Otherwise, -ENODEV or -EINVAL is returned.
238243
*/
@@ -400,7 +405,7 @@ int __init acpi_table_parse(char *id, acpi_tbl_table_handler handler)
400405
return -ENODEV;
401406
}
402407

403-
/*
408+
/*
404409
* The BIOS is supposed to supply a single APIC/MADT,
405410
* but some report two. Provide a knob to use either.
406411
* (don't you wish instance 0 and 1 were not the same?)

0 commit comments

Comments
 (0)