* [PATCH] fix setup_efi_pci()
@ 2013-01-14 8:59 Jan Beulich
2013-01-17 12:29 ` Matt Fleming
0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2013-01-14 8:59 UTC (permalink / raw)
To: mjg; +Cc: Bjorn Helgaas, linux-kernel
This fixes three issues:
- missing parentheses around a flag test
- wrong memory type used for allocation intended to persist post-boot
- four similar build warnings on 32-bit (casts between different size
pointers and integers)
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
arch/x86/boot/compressed/eboot.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
--- 3.8-rc3/arch/x86/boot/compressed/eboot.c
+++ 3.8-rc3-x86-EFI-PCI-ROMs/arch/x86/boot/compressed/eboot.c
@@ -256,10 +256,10 @@ static efi_status_t setup_efi_pci(struct
int i;
struct setup_data *data;
- data = (struct setup_data *)params->hdr.setup_data;
+ data = (struct setup_data *)(unsigned long)params->hdr.setup_data;
while (data && data->next)
- data = (struct setup_data *)data->next;
+ data = (struct setup_data *)(unsigned long)data->next;
status = efi_call_phys5(sys_table->boottime->locate_handle,
EFI_LOCATE_BY_PROTOCOL, &pci_proto,
@@ -302,7 +302,7 @@ static efi_status_t setup_efi_pci(struct
if (status != EFI_SUCCESS)
continue;
- if (!attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM)
+ if (!(attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM))
continue;
if (!pci->romimage || !pci->romsize)
@@ -311,7 +311,7 @@ static efi_status_t setup_efi_pci(struct
size = pci->romsize + sizeof(*rom);
status = efi_call_phys3(sys_table->boottime->allocate_pool,
- EFI_LOADER_DATA, size, &rom);
+ EFI_RUNTIME_SERVICES_DATA, size, &rom);
if (status != EFI_SUCCESS)
continue;
@@ -345,9 +345,9 @@ static efi_status_t setup_efi_pci(struct
memcpy(rom->romdata, pci->romimage, pci->romsize);
if (data)
- data->next = (uint64_t)rom;
+ data->next = (unsigned long)rom;
else
- params->hdr.setup_data = (uint64_t)rom;
+ params->hdr.setup_data = (unsigned long)rom;
data = (struct setup_data *)rom;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix setup_efi_pci()
2013-01-14 8:59 [PATCH] fix setup_efi_pci() Jan Beulich
@ 2013-01-17 12:29 ` Matt Fleming
2013-01-17 15:40 ` Jan Beulich
0 siblings, 1 reply; 3+ messages in thread
From: Matt Fleming @ 2013-01-17 12:29 UTC (permalink / raw)
To: Jan Beulich; +Cc: Bjorn Helgaas, linux-kernel, Matthew Garrett, linux-efi
On Mon, 2013-01-14 at 08:59 +0000, Jan Beulich wrote:
> This fixes three issues:
> - missing parentheses around a flag test
> - wrong memory type used for allocation intended to persist post-boot
> - four similar build warnings on 32-bit (casts between different size
> pointers and integers)
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> ---
> arch/x86/boot/compressed/eboot.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
Jan, could you resubmit items 2 and 3 as separate patches please? Item 1
on your list has already been fixed in Linus' tree,
commit 886d751a2ea99a160f2d0a472231566d9cb0cf58
Author: Sasha Levin <sasha.levin@oracle.com>
Date: Thu Dec 20 14:11:33 2012 -0500
x86, efi: correct precedence of operators in setup_efi_pci
With the current code, the condition in the if() doesn't make much sense due
precedence of operators.
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Link: http://lkml.kernel.org/r/1356030701-16284-25-git-send-email-sasha.levi
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
--
Matt Fleming, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix setup_efi_pci()
2013-01-17 12:29 ` Matt Fleming
@ 2013-01-17 15:40 ` Jan Beulich
0 siblings, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2013-01-17 15:40 UTC (permalink / raw)
To: Matt Fleming; +Cc: Bjorn Helgaas, Matthew Garrett, linux-efi, linux-kernel
>>> On 17.01.13 at 13:29, Matt Fleming <matt@console-pimps.org> wrote:
> On Mon, 2013-01-14 at 08:59 +0000, Jan Beulich wrote:
>> This fixes three issues:
>> - missing parentheses around a flag test
>> - wrong memory type used for allocation intended to persist post-boot
>> - four similar build warnings on 32-bit (casts between different size
>> pointers and integers)
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>
>> ---
>> arch/x86/boot/compressed/eboot.c | 12 ++++++------
>> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> Jan, could you resubmit items 2 and 3 as separate patches please?
Sure, will do (probably only after rc4 though).
> Item 1 on your list has already been fixed in Linus' tree,
Yet I know I checked the tree right before sending...
Jan
> commit 886d751a2ea99a160f2d0a472231566d9cb0cf58
> Author: Sasha Levin <sasha.levin@oracle.com>
> Date: Thu Dec 20 14:11:33 2012 -0500
>
> x86, efi: correct precedence of operators in setup_efi_pci
>
> With the current code, the condition in the if() doesn't make much sense
> due
> precedence of operators.
>
> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
> Link:
> http://lkml.kernel.org/r/1356030701-16284-25-git-send-email-sasha.levi
> Cc: Matt Fleming <matt.fleming@intel.com>
> Cc: Matthew Garrett <mjg@redhat.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Seth Forshee <seth.forshee@canonical.com>
> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
>
> --
> Matt Fleming, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-17 15:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-14 8:59 [PATCH] fix setup_efi_pci() Jan Beulich
2013-01-17 12:29 ` Matt Fleming
2013-01-17 15:40 ` Jan Beulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®