diff options
author | Al Stone <ahs3@redhat.com> | 2016-08-19 18:48:13 -0600 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-08-31 01:37:15 +0200 |
commit | 99b0efd7c886f4c985cb2727a86548413922cbe2 (patch) | |
tree | 71032c019e78b77f001166026f220eb9fb439d18 /drivers/acpi/tables.c | |
parent | 8726d4f441505def8a488d50e50568403f6ad191 (diff) |
ACPI / tables: do not report the number of entries ignored by acpi_parse_entries()
The function acpi_parse_entries_array() has a limiting parameter,
max_entries, which tells the function to stop looking at subtables
once that limit has been reached. If the limit is reached, it is
reported. However, the logic is incorrect in that the loop to
examine all subtables will always report that zero subtables have
been ignored since it does not continue once the max_entries have
been reached.
One approach to fixing this would be to correct the logic so that
all subtables are examined, even if we have hit the max_entries, but
without executing all the callback functions. This could be risky
since we cannot guarantee that no callback will ever have side effects
that another callback depends on to work correctly.
So, the simplest approach is to just remove the part of the error
message that will always be incorrect.
Signed-off-by: Al Stone <ahs3@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/tables.c')
-rw-r--r-- | drivers/acpi/tables.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index b7dac30adf0c..4dfbf491b6e3 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -304,8 +304,8 @@ acpi_parse_entries_array(char *id, unsigned long table_size, } if (max_entries && count > max_entries) { - pr_warn("[%4.4s:0x%02x] ignored %i entries of %i found\n", - id, proc->id, count - max_entries, count); + pr_warn("[%4.4s:0x%02x] found the maximum %i entries\n", + id, proc->id, count); } return errs ? -EINVAL : count; |