Re: [PATCH] x86, efi: Fix a build warning

2013-04-25 Thread Matt Fleming
On 25/04/13 11:47, Borislav Petkov wrote: > I wonder - if efi_runtime_service_t contained only void * like > efi_boot_services_t then we could drop all the casts too, right? Even in > the efi_call* macro calls too... Yeah, that's what I figured. > If you want me, I can take care of it after the

Re: [PATCH] x86, efi: Fix a build warning

2013-04-25 Thread Borislav Petkov
On Thu, Apr 25, 2013 at 08:19:05AM +0100, Matt Fleming wrote: > Yeah, I'm not advocating using casts, I was just saying "Oh, x86-64 > avoids requiring the caller of efi_call_phys* to perform the cast > by doing it in the definition of efi_call*. That's why this is only > affecting 32-bit." > >

Re: [PATCH] x86, efi: Fix a build warning

2013-04-25 Thread Ingo Molnar
* Matt Fleming wrote: > On 25/04/13 07:55, Ingo Molnar wrote: > > It's a basic cleanliness and robustness issue: we generally avoid type > > casts in the kernel, because type casts override compile-time type checks > > and are easy to get wrong. They are also ugly. > > > > So in generaly we

Re: [PATCH] x86, efi: Fix a build warning

2013-04-25 Thread Matt Fleming
On 25/04/13 07:55, Ingo Molnar wrote: > It's a basic cleanliness and robustness issue: we generally avoid type > casts in the kernel, because type casts override compile-time type checks > and are easy to get wrong. They are also ugly. > > So in generaly we try to use the right type for the

Re: [PATCH] x86, efi: Fix a build warning

2013-04-25 Thread Ingo Molnar
* Matt Fleming wrote: > On 24/04/13 11:56, Ingo Molnar wrote: > > > > * Borislav Petkov wrote: > > > >> From: Borislav Petkov > >> > >> Fix this: > >> > >> arch/x86/boot/compressed/eboot.c: In function ???setup_efi_vars???: > >> arch/x86/boot/compressed/eboot.c:269:2: warning: passing

Re: [PATCH] x86, efi: Fix a build warning

2013-04-25 Thread Ingo Molnar
* Matt Fleming matt.flem...@intel.com wrote: On 24/04/13 11:56, Ingo Molnar wrote: * Borislav Petkov b...@alien8.de wrote: From: Borislav Petkov b...@suse.de Fix this: arch/x86/boot/compressed/eboot.c: In function ???setup_efi_vars???: arch/x86/boot/compressed/eboot.c:269:2:

Re: [PATCH] x86, efi: Fix a build warning

2013-04-25 Thread Matt Fleming
On 25/04/13 07:55, Ingo Molnar wrote: It's a basic cleanliness and robustness issue: we generally avoid type casts in the kernel, because type casts override compile-time type checks and are easy to get wrong. They are also ugly. So in generaly we try to use the right type for the data

Re: [PATCH] x86, efi: Fix a build warning

2013-04-25 Thread Ingo Molnar
* Matt Fleming matt.flem...@intel.com wrote: On 25/04/13 07:55, Ingo Molnar wrote: It's a basic cleanliness and robustness issue: we generally avoid type casts in the kernel, because type casts override compile-time type checks and are easy to get wrong. They are also ugly. So in

Re: [PATCH] x86, efi: Fix a build warning

2013-04-25 Thread Borislav Petkov
On Thu, Apr 25, 2013 at 08:19:05AM +0100, Matt Fleming wrote: Yeah, I'm not advocating using casts, I was just saying Oh, x86-64 avoids requiring the caller of efi_call_phys* to perform the cast by doing it in the definition of efi_call*. That's why this is only affecting 32-bit. Cleaning

Re: [PATCH] x86, efi: Fix a build warning

2013-04-25 Thread Matt Fleming
On 25/04/13 11:47, Borislav Petkov wrote: I wonder - if efi_runtime_service_t contained only void * like efi_boot_services_t then we could drop all the casts too, right? Even in the efi_call* macro calls too... Yeah, that's what I figured. If you want me, I can take care of it after the

Re: [PATCH] x86, efi: Fix a build warning

2013-04-24 Thread Borislav Petkov
On Wed, Apr 24, 2013 at 12:17:59PM +0100, Matt Fleming wrote: > We could either change all fields in efi_system_table or the > efi_call_phys* prototypes. x86-64 already casts to (void *) when > calling efi_call0(), etc, though I'm not entirely sure why void * is > needed. Well, sizeof(void *) ==

Re: [PATCH] x86, efi: Fix a build warning

2013-04-24 Thread Matt Fleming
On 24/04/13 11:56, Ingo Molnar wrote: > > * Borislav Petkov wrote: > >> From: Borislav Petkov >> >> Fix this: >> >> arch/x86/boot/compressed/eboot.c: In function ???setup_efi_vars???: >> arch/x86/boot/compressed/eboot.c:269:2: warning: passing argument 1 of >> ???efi_call_phys??? makes

Re: [PATCH] x86, efi: Fix a build warning

2013-04-24 Thread Ingo Molnar
* Borislav Petkov wrote: > From: Borislav Petkov > > Fix this: > > arch/x86/boot/compressed/eboot.c: In function ???setup_efi_vars???: > arch/x86/boot/compressed/eboot.c:269:2: warning: passing argument 1 of > ???efi_call_phys??? makes pointer from integer without a cast [enabled by >

Re: [PATCH] x86, efi: Fix a build warning

2013-04-24 Thread Matt Fleming
On 24/04/13 11:09, Borislav Petkov wrote: > From: Borislav Petkov > > Fix this: > > arch/x86/boot/compressed/eboot.c: In function ‘setup_efi_vars’: > arch/x86/boot/compressed/eboot.c:269:2: warning: passing argument 1 of > ‘efi_call_phys’ makes pointer from integer without a cast [enabled by

[PATCH] x86, efi: Fix a build warning

2013-04-24 Thread Borislav Petkov
From: Borislav Petkov Fix this: arch/x86/boot/compressed/eboot.c: In function ‘setup_efi_vars’: arch/x86/boot/compressed/eboot.c:269:2: warning: passing argument 1 of ‘efi_call_phys’ makes pointer from integer without a cast [enabled by default] In file included from

[PATCH] x86, efi: Fix a build warning

2013-04-24 Thread Borislav Petkov
From: Borislav Petkov b...@suse.de Fix this: arch/x86/boot/compressed/eboot.c: In function ‘setup_efi_vars’: arch/x86/boot/compressed/eboot.c:269:2: warning: passing argument 1 of ‘efi_call_phys’ makes pointer from integer without a cast [enabled by default] In file included from

Re: [PATCH] x86, efi: Fix a build warning

2013-04-24 Thread Matt Fleming
On 24/04/13 11:09, Borislav Petkov wrote: From: Borislav Petkov b...@suse.de Fix this: arch/x86/boot/compressed/eboot.c: In function ‘setup_efi_vars’: arch/x86/boot/compressed/eboot.c:269:2: warning: passing argument 1 of ‘efi_call_phys’ makes pointer from integer without a cast [enabled

Re: [PATCH] x86, efi: Fix a build warning

2013-04-24 Thread Ingo Molnar
* Borislav Petkov b...@alien8.de wrote: From: Borislav Petkov b...@suse.de Fix this: arch/x86/boot/compressed/eboot.c: In function ???setup_efi_vars???: arch/x86/boot/compressed/eboot.c:269:2: warning: passing argument 1 of ???efi_call_phys??? makes pointer from integer without a cast

Re: [PATCH] x86, efi: Fix a build warning

2013-04-24 Thread Matt Fleming
On 24/04/13 11:56, Ingo Molnar wrote: * Borislav Petkov b...@alien8.de wrote: From: Borislav Petkov b...@suse.de Fix this: arch/x86/boot/compressed/eboot.c: In function ???setup_efi_vars???: arch/x86/boot/compressed/eboot.c:269:2: warning: passing argument 1 of ???efi_call_phys???

Re: [PATCH] x86, efi: Fix a build warning

2013-04-24 Thread Borislav Petkov
On Wed, Apr 24, 2013 at 12:17:59PM +0100, Matt Fleming wrote: We could either change all fields in efi_system_table or the efi_call_phys* prototypes. x86-64 already casts to (void *) when calling efi_call0(), etc, though I'm not entirely sure why void * is needed. Well, sizeof(void *) ==