linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/boot: fix cast to pointer compiler warning
@ 2020-01-08  6:37 Edwin Zimmerman
  2020-01-09 22:24 ` Thomas Gleixner
  0 siblings, 1 reply; 5+ messages in thread
From: Edwin Zimmerman @ 2020-01-08  6:37 UTC (permalink / raw)
  To: edwin, x86, Matthew Garrett, linux-kernel
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, H. Peter Anvin,
	Junichi Nomura, Erik Schmauss, Josh Boyer

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@211mainstreet.net>
---
 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)

-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86/boot: fix cast to pointer compiler warning
  2020-01-08  6:37 [PATCH] x86/boot: fix cast to pointer compiler warning Edwin Zimmerman
@ 2020-01-09 22:24 ` Thomas Gleixner
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Gleixner @ 2020-01-09 22:24 UTC (permalink / raw)
  To: Edwin Zimmerman, edwin, x86, Matthew Garrett, linux-kernel
  Cc: Ingo Molnar, Borislav Petkov, H. Peter Anvin, Junichi Nomura,
	Erik Schmauss, Josh Boyer

Edwin Zimmerman <edwin@211mainstreet.net> 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@211mainstreet.net>
> ---
>  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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86/boot: fix cast to pointer compiler warning
  2020-01-08  1:18 ` Randy Dunlap
@ 2020-01-08  6:30   ` Edwin Zimmerman
  0 siblings, 0 replies; 5+ messages in thread
From: Edwin Zimmerman @ 2020-01-08  6:30 UTC (permalink / raw)
  To: Randy Dunlap, x86, Matthew Garrett, linux-kernel
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, H. Peter Anvin,
	Chao Fan, Junichi Nomura, Erik Schmauss, Zhenzhong Duan,
	Josh Boyer

On 1/7/2020 8:18 PM, Randy Dunlap wrote:
> On 1/7/20 9:38 PM, Edwin Zimmerman wrote:
>> 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@211mainstreet.net>
>> ---
>> 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)
>>
> Lots of whitespace damage.  Probably your email client or some
> intermediary.
Email client, sorry.  Will resend.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] x86/boot: fix cast to pointer compiler warning
@ 2020-01-08  5:38 Edwin Zimmerman
  2020-01-08  1:18 ` Randy Dunlap
  0 siblings, 1 reply; 5+ messages in thread
From: Edwin Zimmerman @ 2020-01-08  5:38 UTC (permalink / raw)
  To: x86, Matthew Garrett, linux-kernel
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, H. Peter Anvin,
	Chao Fan, Junichi Nomura, Erik Schmauss, Edwin Zimmerman,
	Zhenzhong Duan, Josh Boyer

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@211mainstreet.net>
---
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)

-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86/boot: fix cast to pointer compiler warning
  2020-01-08  5:38 Edwin Zimmerman
@ 2020-01-08  1:18 ` Randy Dunlap
  2020-01-08  6:30   ` Edwin Zimmerman
  0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2020-01-08  1:18 UTC (permalink / raw)
  To: Edwin Zimmerman, x86, Matthew Garrett, linux-kernel
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, H. Peter Anvin,
	Chao Fan, Junichi Nomura, Erik Schmauss, Zhenzhong Duan,
	Josh Boyer

On 1/7/20 9:38 PM, Edwin Zimmerman wrote:
> 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@211mainstreet.net>
> ---
> 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)
> 

Lots of whitespace damage.  Probably your email client or some
intermediary.

-- 
~Randy


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-01-09 22:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08  6:37 [PATCH] x86/boot: fix cast to pointer compiler warning Edwin Zimmerman
2020-01-09 22:24 ` Thomas Gleixner
  -- strict thread matches above, loose matches on Subject: below --
2020-01-08  5:38 Edwin Zimmerman
2020-01-08  1:18 ` Randy Dunlap
2020-01-08  6:30   ` Edwin Zimmerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).