mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Borislav Petkov <bp@alien8.de>,
	Stefan Hasko <hasko.stevo@gmail.com>,
	Matt Fleming <matt.fleming@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	x86@kernel.org, linux-efi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arch: x86: boot: compressed: eboot: fix cast warnings on 32b platforms
Date: Tue, 01 Jan 2013 09:34:16 -0800	[thread overview]
Message-ID: <50E31E18.5010404@zytor.com> (raw)
In-Reply-To: <20121226080019.GB11555@liondog.tnic>

On 12/26/2012 12:00 AM, Borislav Petkov wrote:
> On Sat, Dec 22, 2012 at 11:23:25AM +0100, Stefan Hasko wrote:
>> Fixed different size cast warnings in function setup_efi_pci
>>
>> Signed-off-by: Stefan Hasko <hasko.stevo@gmail.com>
> 
> You might want to add the actual compiler warnings to the commit
> message:
> 
> arch/x86/boot/compressed/eboot.c: In function ‘setup_efi_pci’:
> arch/x86/boot/compressed/eboot.c:259:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> arch/x86/boot/compressed/eboot.c:262:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> arch/x86/boot/compressed/eboot.c:348:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> arch/x86/boot/compressed/eboot.c:350:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> 
> And yes, I see them in all{mod,yes}config builds here too. The issue,
> AFAICT, is that setup_data is __u64 to obviously accomodate 8-byte
> pointers on x86-64 but on 32-bit they're half the size. And we obviously
> cannot change struct setup_data since this is an ABI so I'd guess the
> casts to native pointer sizes are ok. So
> 
> Acked-by: Borislav Petkov <bp@alien8.de>
> 

Yes, but stylistically: we don't use uintptr_t in Linux, but rather
"unsigned long".

	-hpa



  reply	other threads:[~2013-01-01 17:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-22 10:23 Stefan Hasko
2012-12-26  8:00 ` Borislav Petkov
2013-01-01 17:34   ` H. Peter Anvin [this message]
2013-01-03 12:19     ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50E31E18.5010404@zytor.com \
    --to=hpa@zytor.com \
    --cc=bp@alien8.de \
    --cc=hasko.stevo@gmail.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome