Re: [PATCH] x86/boot: fix cast to pointer compiler warning
From: Thomas Gleixner
Date: Thu Jan 09 2020 - 17:25:12 EST
Edwin Zimmerman <edwin@xxxxxxxxxxxxxxxxx> writes:
> Fix cast-to-pointer compiler warning
>
> arch/x86/boot/compressed/acpi.c: In function 'get_acpi_srat_table':
> arch/x86/boot/compressed/acpi.c:316:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> rsdp = (struct acpi_table_rsdp *)get_cmdline_acpi_rsdp();
> ÂÂÂÂÂ ÂÂÂ ÂÂÂ ÂÂ ^
>
> Fixes: 41fa1ee9c6d6 ("acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down")
> Signed-off-by: Edwin Zimmerman <edwin@xxxxxxxxxxxxxxxxx>
> ---
> Âarch/x86/boot/compressed/acpi.c | 2 +-
> Â1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/boot/compressed/acpi.c b/arch/x86/boot/compressed/acpi.c
> index 25019d42ae93..5d2568066d58 100644
> --- a/arch/x86/boot/compressed/acpi.c
> +++ b/arch/x86/boot/compressed/acpi.c
> @@ -313,7 +313,7 @@ static unsigned long get_acpi_srat_table(void)
> ÂÂÂ Â * stash this in boot params because the kernel itself may have
> ÂÂÂ Â * different ideas about whether to trust a command-line parameter.
> ÂÂÂ Â */
> -ÂÂ Ârsdp = (struct acpi_table_rsdp *)get_cmdline_acpi_rsdp();
> +ÂÂ Ârsdp = (struct acpi_table_rsdp *)(long)get_cmdline_acpi_rsdp();
> Â
> ÂÂÂ Âif (!rsdp)
> ÂÂÂ ÂÂÂ Ârsdp = (struct acpi_table_rsdp *)(long)
^^^^^^^^
This is whitespace damaged, please fix your mail setup. Try to send the
patch to yourself and check whether it applies.
Thanks,
tglx