ACK: [PATCH] lib: fwts_acpi_tables: use bit-wise & rather than logical &&
ivanhu
ivan.hu at canonical.com
Mon Feb 22 04:33:45 UTC 2021
On 2/19/21 9:27 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> The masking is currently using logical && operator instead of the
> bit-wise & operator. Fix this.
>
> Fixes: 09216cd3701f ("lib: fwts_acpi_tables: update fwts_get_acpi_version (mantis: 2105)")
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/lib/src/fwts_acpi_tables.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
> index d522dfbc..455d3a6b 100644
> --- a/src/lib/src/fwts_acpi_tables.c
> +++ b/src/lib/src/fwts_acpi_tables.c
> @@ -1773,7 +1773,7 @@ uint32_t fwts_get_acpi_version(fwts_framework *fw)
> }
>
> fadt = (fwts_acpi_table_fadt *) table->data;
> - minor = ((fadt->minor_version && 0xF) << 4) + ((fadt->minor_version && 0xF0) >> 4);
> + minor = ((fadt->minor_version & 0xF) << 4) + ((fadt->minor_version & 0xF0) >> 4);
> acpi_version = (fadt->header.revision << 8) + minor;
>
> /* check FACP returns an invalid value */
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list