ACK: [PATCH 15/27] acpi: fadt: add in missing const to fix build warnings
Alex Hung
alex.hung at canonical.com
Wed Aug 15 18:10:46 UTC 2018
On 2018-08-15 06:11 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Add in missing const, cleans up warnings such as:
> cast discards ‘const’ qualifier from pointer target type
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/acpi/fadt/fadt.c | 32 ++++++++++++++++----------------
> 1 file changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/src/acpi/fadt/fadt.c b/src/acpi/fadt/fadt.c
> index 6304d14c..dd31c8a0 100644
> --- a/src/acpi/fadt/fadt.c
> +++ b/src/acpi/fadt/fadt.c
> @@ -596,64 +596,64 @@ static void acpi_table_check_fadt_reduced_hardware(fwts_framework *fw)
> fwts_log_info(fw, "CENTURY is non-zero: 0x%x",
> fadt->century);
> }
> - if (memcmp((void *)&fadt->x_pm1a_evt_blk,
> - (void *)&null_gas,
> + if (memcmp((const void *)&fadt->x_pm1a_evt_blk,
> + (const void *)&null_gas,
> sizeof(fwts_acpi_gas))) {
> passed = false;
> fwts_log_info(fw,
> "X_PM1A_EVT_BLK is a non-zero general "
> "address structure.");
> }
> - if (memcmp((void *)&fadt->x_pm1b_evt_blk,
> - (void *)&null_gas,
> + if (memcmp((const void *)&fadt->x_pm1b_evt_blk,
> + (const void *)&null_gas,
> sizeof(fwts_acpi_gas))) {
> passed = false;
> fwts_log_info(fw,
> "X_PM1B_EVT_BLK is a non-zero general "
> "address structure.");
> }
> - if (memcmp((void *)&fadt->x_pm1a_cnt_blk,
> - (void *)&null_gas,
> + if (memcmp((const void *)&fadt->x_pm1a_cnt_blk,
> + (const void *)&null_gas,
> sizeof(fwts_acpi_gas))) {
> passed = false;
> fwts_log_info(fw,
> "X_PM1A_CNT_BLK is a non-zero general "
> "address structure.");
> }
> - if (memcmp((void *)&fadt->x_pm1b_cnt_blk,
> - (void *)&null_gas,
> + if (memcmp((const void *)&fadt->x_pm1b_cnt_blk,
> + (const void *)&null_gas,
> sizeof(fwts_acpi_gas))) {
> passed = false;
> fwts_log_info(fw,
> "X_PM1B_CNT_BLK is a non-zero general "
> "address structure.");
> }
> - if (memcmp((void *)&fadt->x_pm2_cnt_blk,
> - (void *)&null_gas,
> + if (memcmp((const void *)&fadt->x_pm2_cnt_blk,
> + (const void *)&null_gas,
> sizeof(fwts_acpi_gas))) {
> passed = false;
> fwts_log_info(fw,
> "X_PM2_CNT_BLK is a non-zero general "
> "address structure.");
> }
> - if (memcmp((void *)&fadt->x_pm_tmr_blk,
> - (void *)&null_gas,
> + if (memcmp((const void *)&fadt->x_pm_tmr_blk,
> + (const void *)&null_gas,
> sizeof(fwts_acpi_gas))) {
> passed = false;
> fwts_log_info(fw,
> "X_PM_TMR_BLK is a non-zero general "
> "address structure.");
> }
> - if (memcmp((void *)&fadt->x_gpe0_blk,
> - (void *)&null_gas,
> + if (memcmp((const void *)&fadt->x_gpe0_blk,
> + (const void *)&null_gas,
> sizeof(fwts_acpi_gas))) {
> passed = false;
> fwts_log_info(fw,
> "X_GPE0_BLK is a non-zero general "
> "address structure.");
> }
> - if (memcmp((void *)&fadt->x_gpe1_blk,
> - (void *)&null_gas,
> + if (memcmp((const void *)&fadt->x_gpe1_blk,
> + (const void *)&null_gas,
> sizeof(fwts_acpi_gas))) {
> passed = false;
> fwts_log_info(fw,
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list