[PATCH] acpi: gtdt: Fix the wrong checking of GTDT block
Alex Hung
alex.hung at canonical.com
Mon Mar 28 04:22:43 UTC 2016
On 2016-03-23 04:45 PM, Vikas C Sajjan wrote:
> when "fwts gtdt" is executed, fwts throws below error even when the
> GTDT table looks fine in the "fwts acpidump".
>
> gtdt: GTDT Generic Timer Description Table test
> -------------------------------
> Test 1 of 1: GTDT Generic Timer Description Table test.
> FAILED [HIGH] GTDTShortBlock: Test 1, GTDT block is too short
> -------------------------------
>
> This patch removes the error checking,
> since (ptr + 20) is always less than end_ptr even for the valid
> GTDT block.
>
> Signed-off-by: Vikas C Sajjan <vikas.cha.sajjan at hpe.com>
> Signed-off-by: Sunil V L <sunil.vl at hpe.com>
> ---
> src/acpi/gtdt/gtdt.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/src/acpi/gtdt/gtdt.c b/src/acpi/gtdt/gtdt.c
> index 421f17f..05ccea1 100644
> --- a/src/acpi/gtdt/gtdt.c
> +++ b/src/acpi/gtdt/gtdt.c
> @@ -75,13 +75,6 @@ static int gtdt_test1(fwts_framework *fw)
> case 0x00:
> /* GT Block Structure */
> block = (fwts_acpi_table_gtdt_block *)ptr;
> - if (ptr + 20 < end_ptr) {
> - passed = false;
> - fwts_failed(fw, LOG_LEVEL_HIGH,
> - "GTDTShortBlock",
> - "GTDT block is too short");
> - goto done;
> - }
I think the original intention is to have a greater sign such as "ptr +
20 > end_ptr", instead of the less sign.
I do think this patch is fine but let's wait for comments from the
original author, Colin King.
> if (block->length < 20) {
> passed = false;
> fwts_failed(fw, LOG_LEVEL_HIGH,
>
--
Cheers,
Alex Hung
More information about the fwts-devel
mailing list