All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
To: Borislav Petkov <bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>,
	Stefan Hasko
	<hasko.stevo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Matt Fleming
	<matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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-f9CnO7I+Q6zU6FkGJEIX5A@public.gmane.org>

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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> 
> 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-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>
> 

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

	-hpa

WARNING: multiple messages have this Message-ID (diff)
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



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

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-22 10:23 [PATCH] arch: x86: boot: compressed: eboot: fix cast warnings on 32b platforms Stefan Hasko
     [not found] ` <1356171805-16930-1-git-send-email-hasko.stevo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-12-26  8:00   ` Borislav Petkov
2012-12-26  8:00     ` Borislav Petkov
     [not found]     ` <20121226080019.GB11555-f9CnO7I+Q6zU6FkGJEIX5A@public.gmane.org>
2013-01-01 17:34       ` H. Peter Anvin [this message]
2013-01-01 17:34         ` H. Peter Anvin
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-ymnouzjc4hwavxtiumwx3w@public.gmane.org \
    --cc=bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org \
    --cc=hasko.stevo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.